Add and enable cloud-init for ami images

Images don't work at all on AWS without cloud-init.

Fixes #492
This commit is contained in:
Lars Karlitski 2018-10-05 14:01:11 +02:00 committed by Brian C. Lane
parent 29fe174b6b
commit 8f1bc6e882
1 changed files with 6 additions and 1 deletions

View File

@ -25,11 +25,14 @@ timezone US/Eastern
bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 console=tty1 net.ifnames=0"
# Basic services
services --enabled=sshd,chronyd
services --enabled=sshd,chronyd,cloud-init
%post
# Remove random-seed
rm /var/lib/systemd/random-seed
# tell cloud-init to create the ec2-user account
sed -i 's/cloud-user/ec2-user/' /etc/cloud/cloud.cfg
%end
%packages
@ -40,4 +43,6 @@ grub2
chrony
cloud-init
# NOTE lorax-composer will add the recipe packages below here, including the final %end