44 lines
1018 B
YAML
44 lines
1018 B
YAML
#cloud-config
|
|
|
|
ssh_import_id:
|
|
- lp:arif-ali
|
|
|
|
## Update apt database and upgrade packages on first boot
|
|
package_update: true
|
|
package_upgrade: true
|
|
|
|
users:
|
|
- default
|
|
- name: virsh
|
|
primary_group: virsh
|
|
groups: [ libvirt, libvirt-qemu ]
|
|
passwd: $6$rounds=4096$lSbs3gFH3KhLmbWi$EYqoyw2QreaFBonLX8VQgcCGdWktsggp2j/D3qAnQT6azw92hZR8Vvu.wVlDzBaCPPzh8HO.QPprzVruEoqLP0
|
|
|
|
## Install additional packages on first boot
|
|
packages:
|
|
- virtinst
|
|
- bc
|
|
- jq
|
|
- qemu-kvm
|
|
- libvirt-bin
|
|
- qemu-efi
|
|
|
|
## Write arbitrary files to the file-system (including binaries!)
|
|
write_files:
|
|
- path: /root/initial_setup.sh
|
|
content: |
|
|
#!/bin/bash
|
|
|
|
git clone https://github.com/arif-ali/maas-autobuilder.git /root/maas-autobuilder
|
|
cd /root/maas-autobuilder
|
|
ln -sf ${HOSTNAME}.config maas-autobuilder/hypervisor.config
|
|
|
|
chmod +x manage-maas-nodes.sh
|
|
./manage-maas-nodes.sh
|
|
permissions: '0755'
|
|
owner: root:root
|
|
|
|
# Runs any command that we need to run post install
|
|
runcmd:
|
|
- [ "/root/initial_setup.sh" ]
|