pandora/vm/cloud-config

48 lines
1.3 KiB
Text
Raw Normal View History

2017-03-17 00:21:24 +00:00
#cloud-config
hostname: pandora
password: pandora
chpasswd: { expire: False }
ssh_pwauth: True
growpart:
mode: auto
devices: ['/']
ignore_growroot_disabled: false
write_files:
- path: /etc/systemd/network/eth.network
permissions: 0644
owner: root
content: |
[Match]
Name=e*
[Network]
DHCP=yes
2017-10-24 19:24:44 +00:00
packages_update: true
packages_upgrade: true
packages:
- curl
- ca-certificates
- avahi-daemon
2017-03-17 00:21:24 +00:00
runcmd:
- sed -i s/ubuntu/pandora/g /etc/passwd /etc/shadow /etc/group
- mv /home/ubuntu /home/pandora
- echo "pandora:pandora" | chpasswd
- echo 127.0.0.1 pandora | tee -a /etc/hosts
2017-03-17 00:21:24 +00:00
- curl -sL https://pan.do/ra-install -o /root/pandora_install.sh
- chmod +x /root/pandora_install.sh
2017-10-24 19:24:44 +00:00
- /root/pandora_install.sh 2>&1 | tee /root/pandora_install.log
2017-03-17 00:21:24 +00:00
- sed -i s/console=ttyS0/quiet/g /etc/default/grub /boot/grub/grub.cfg /etc/default/grub.d/50-cloudimg-settings.cfg
- apt-get purge -y cloud-init
- systemctl enable systemd-networkd.service
- systemctl enable systemd-networkd-wait-online.service
- systemctl enable systemd-resolved.service
- apt-get purge -y resolvconf
- rm /etc/resolv.conf /etc/network/interfaces.d/*
- ln -s ../run/systemd/resolve/resolv.conf /etc/resolv.conf
2017-03-17 00:21:24 +00:00
- poweroff