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:
parent
9717b3fd98
commit
81d38b6445
@ -25,11 +25,14 @@ timezone US/Eastern
|
|||||||
bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 console=tty1 net.ifnames=0"
|
bootloader --location=mbr --append="no_timer_check console=ttyS0,115200n8 console=tty1 net.ifnames=0"
|
||||||
|
|
||||||
# Basic services
|
# Basic services
|
||||||
services --enabled=sshd,chronyd
|
services --enabled=sshd,chronyd,cloud-init
|
||||||
|
|
||||||
%post
|
%post
|
||||||
# Remove random-seed
|
# Remove random-seed
|
||||||
rm /var/lib/systemd/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
|
%end
|
||||||
|
|
||||||
%packages
|
%packages
|
||||||
@ -40,4 +43,6 @@ grub2
|
|||||||
|
|
||||||
chrony
|
chrony
|
||||||
|
|
||||||
|
cloud-init
|
||||||
|
|
||||||
# NOTE lorax-composer will add the recipe packages below here, including the final %end
|
# NOTE lorax-composer will add the recipe packages below here, including the final %end
|
||||||
|
Loading…
Reference in New Issue
Block a user