/srv/irclogs.ubuntu.com/2021/06/11/#cloud-init.txt

Tom53432Would anyone be able to help me debug an issue with cloud-init in AWS? I have a file in /var/lib/cloud/scripts/per-instance that should run on first boot. Normally, when I spin up a new instance, it does. However, if I deploy an EC2 instance (Custom CentOS 7 that created with Packer, which is where the per-instance script gets added in) with17:30
Tom53432additional commands in provided via AWS's 'user data' field, the user data script will run, but the per-instance script will not. cloud-init analyze show -i /var/log/cloud-init.log doesn't show me anything obviously wrong. Is there anything I'm missing? I have had a hard time finding info on whether cloud-init uses some sort of precedence that I'm17:30
Tom53432just missing where per-instance scripts won't run if a user data script is provided.  Normally I'm pretty good at search fu but I'm having a hard time formalizing the issue I'm having in a way thats turning up any useful results. 17:30
anankeTom53432: interesting. I have no advice, but I wanted to note that we do just that: we build our AMIs with packer, and we use cloud-init during build time to drop scripts in /var/lib/cloud/scripts/per-instance17:55
anankethen on each new instance boot (whether it's new ec2, or a snapshot off an existing one), the scripts run just fine17:55

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!