moved the salt commands from ec2 script to rc.local to run them at the end of startup and not in the middle
authorPaul Tonelli <paul.tonelli@logilab.fr>
Mon, 11 Mar 2013 15:09:06 +0100
changeset 56 b9b71002538b
parent 55 a8fc89e61f2b
child 57 28cbe9dbaf1f
moved the salt commands from ec2 script to rc.local to run them at the end of startup and not in the middle
others/ec2-run-user-data
others/rc.local
--- a/others/ec2-run-user-data	Mon Mar 11 14:29:12 2013 +0100
+++ b/others/ec2-run-user-data	Mon Mar 11 15:09:06 2013 +0100
@@ -46,12 +46,5 @@
 fi
 rm -f $user_data_file
 
-### Specific to salt-call machine creation
-
-/usr/bin/env salt-call state.highstate
-/usr/bin/env salt-call state.highstate
-/usr/bin/env salt-call vm_create.create_variation 
-
-
 # Disable this script, it may only run once
 insserv -r $0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/others/rc.local	Mon Mar 11 15:09:06 2013 +0100
@@ -0,0 +1,20 @@
+#!/bin/sh -e
+#
+# rc.local
+#
+# This script is executed at the end of each multiuser runlevel.
+# Make sure that the script will "exit 0" on success or any other
+# value on error.
+#
+# In order to enable or disable this script just change the execution
+# bits.
+#
+# By default this script does nothing.
+
+### Specific to salt-call machine creation
+
+/usr/bin/env salt-call state.highstate
+/usr/bin/env salt-call state.highstate
+/usr/bin/env salt-call vm_create.create_variation
+
+exit 0