From 8f1bc6e8825877228dea09ec427b6701645e3d0c Mon Sep 17 00:00:00 2001 From: Lars Karlitski Date: Fri, 5 Oct 2018 14:01:11 +0200 Subject: [PATCH] Add and enable cloud-init for ami images Images don't work at all on AWS without cloud-init. Fixes #492 --- share/composer/ami.ks | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/share/composer/ami.ks b/share/composer/ami.ks index 86d8f26a..d50c5d9b 100644 --- a/share/composer/ami.ks +++ b/share/composer/ami.ks @@ -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