aboutsummaryrefslogtreecommitdiffstats
path: root/firstboot
diff options
context:
space:
mode:
authorSteve Baker <sbaker@redhat.com>2017-07-26 10:14:30 +1200
committerSteve Baker <sbaker@redhat.com>2017-07-26 10:14:30 +1200
commit05f773006a0f8f1ea50ba23bfaa16ef68ef6ec55 (patch)
tree8fd455541b3319264f0f9bc060d14c638fbf8e44 /firstboot
parent8071beda51cdb71009ed071b36843b57a06d895b (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
Diffstat (limited to 'firstboot')
-rw-r--r--firstboot/userdata_example.yaml3
1 files changed, 1 insertions, 2 deletions
diff --git a/firstboot/userdata_example.yaml b/firstboot/userdata_example.yaml
index 2f03c83..32da7ed 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: