diff options
author | Steve Baker <sbaker@redhat.com> | 2017-07-26 10:14:30 +1200 |
---|---|---|
committer | Steve Baker <sbaker@redhat.com> | 2017-07-26 10:14:30 +1200 |
commit | 05f773006a0f8f1ea50ba23bfaa16ef68ef6ec55 (patch) | |
tree | 8fd455541b3319264f0f9bc060d14c638fbf8e44 | |
parent | 8071beda51cdb71009ed071b36843b57a06d895b (diff) |
Don't curl metadata server in userdata example
The metadata server is switched off in
I45ae6d0e3726cc71c7dc35a9a47da8b7a0bab9cb, so this example has been
updated to use os-apply-config to fetch the ssh key instead.
Change-Id: I82b05f9b35ffc6ea2cee9a64d5702c0404cd47de
-rw-r--r-- | firstboot/userdata_example.yaml | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/firstboot/userdata_example.yaml b/firstboot/userdata_example.yaml index 2f03c83b..32da7eda 100644 --- a/firstboot/userdata_example.yaml +++ b/firstboot/userdata_example.yaml @@ -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: |