Add and enable cloud-init for ami images

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

Fixes #492

(cherry picked from commit 81d38b6445)

Related: rhbz#1628647
This commit is contained in:
Lars Karlitski 2018-10-05 14:01:11 +02:00 committed by David Shea
parent c13aa84f02
commit 43aedf6a15

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 blueprint packages below here, including the final %end