Merge "Don't curl metadata server in userdata example"

This commit is contained in:
Jenkins 2017-08-09 04:41:12 +00:00 committed by Gerrit Code Review
commit ee5a92b953

View File

@ -42,10 +42,9 @@ resources:
str_replace:
template: |
#!/bin/bash
curl http://169.254.169.254/openstack/2012-08-10/meta_data.json -o /root/meta_data.json
mkdir -p /home/$user/.ssh
chmod 700 /home/$user/.ssh
cat /root/meta_data.json | jq -r ".keys[0].data" > /home/$user/.ssh/authorized_keys
os-apply-config --key public-keys.0.openssh-key --type raw > /home/$user/.ssh/authorized_keys
chmod 600 /home/$user/.ssh/authorized_keys
chown -R $user:$user /home/$user/.ssh
params: