Skip to content

Instantly share code, notes, and snippets.

@ghaering
Created May 27, 2014 07:22
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save ghaering/367e34a69f6a70eed3e0 to your computer and use it in GitHub Desktop.
Save ghaering/367e34a69f6a70eed3e0 to your computer and use it in GitHub Desktop.
Re-run cloud init scripts on Ubuntu 12.04 (AWS)
#!/bin/sh
rm -rf /var/lib/cloud/sem/* /var/lib/cloud/instance /var/lib/cloud/instances/*
cloud-init start 2>&1 > /dev/null
cloud-init-cfg all final
@anthonyscata
Copy link

For Redhat using cloud-init version 0.7.4 the following works

!/bin/sh

rm -rf /var/lib/cloud/sem/* /var/lib/cloud/instance /var/lib/cloud/instances/*
cloud-init init
cloud-init modules -m final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment