Make better use of cloud-init
Signed-off-by: Steven Dake <sdake@redhat.com>
This commit is contained in:
parent
df1ad15c8a
commit
9bad232991
|
@ -12,7 +12,7 @@
|
|||
<description>Fedora 16</description>
|
||||
<commands>
|
||||
<command name='commands'>
|
||||
rm -f /etc/yum.repos.d/fedora-updates*;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local
|
||||
yum -y update --skip-broken;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local
|
||||
#!/bin/bash
|
||||
setenforce 0
|
||||
while true; do
|
||||
|
@ -49,13 +49,7 @@ while [ ! -f /root/.ssh/authorized_keys ]; do
|
|||
sleep 5
|
||||
fi
|
||||
done
|
||||
while [ ! -f /var/lib/cloud/instance/user-data.txt ]; do
|
||||
sleep 1
|
||||
done
|
||||
base64 -d /var/lib/cloud/instance/user-data.txt > /tmp/startup
|
||||
chmod +x /tmp/startup
|
||||
chmod +x /opt/aws/bin/cfn-*
|
||||
/tmp/startup
|
||||
EOF
|
||||
</command>
|
||||
</commands>
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<description>Fedora 17</description>
|
||||
<commands>
|
||||
<command name='commands'>
|
||||
rm -f /etc/yum.repos.d/fedora-updates*;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local
|
||||
yum -y update --skip-broken;yum -y install cloud-init;cat >> /etc/rc.d/rc.local << EOF;chmod +x /etc/rc.d/rc.local
|
||||
#!/bin/bash
|
||||
setenforce 0
|
||||
while true; do
|
||||
|
@ -49,11 +49,6 @@ while [ ! -f /root/.ssh/authorized_keys ]; do
|
|||
sleep 5
|
||||
fi
|
||||
done
|
||||
while [ ! -f /var/lib/cloud/instance/user-data.txt ]; do
|
||||
sleep 1
|
||||
done
|
||||
base64 -d /var/lib/cloud/instance/user-data.txt > /tmp/startup
|
||||
chmod +x /tmp/startup
|
||||
chmod +x /opt/aws/bin/cfn-*
|
||||
/tmp/startup
|
||||
EOF
|
||||
|
|
Loading…
Reference in New Issue