summaryrefslogtreecommitdiffstats
path: root/prototypes/xci/playbooks
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-05-16 15:01:26 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-16 15:01:26 +0000
commit9620b4676471e8cd21890776f8573112cdd16282 (patch)
tree8f7eed64d75a7121f6f605bd167f1e1952712514 /prototypes/xci/playbooks
parent331b1671696fdc7823332add1f48b6ce90b99c75 (diff)
parent723d3bfe75a2007b6316e4f4fb4d4e7d7ac266ea (diff)
Merge "prototypes: xci: Move host keys away from / directory"
Diffstat (limited to 'prototypes/xci/playbooks')
-rw-r--r--prototypes/xci/playbooks/configure-opnfvhost.yml10
-rw-r--r--prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml1
2 files changed, 9 insertions, 2 deletions
diff --git a/prototypes/xci/playbooks/configure-opnfvhost.yml b/prototypes/xci/playbooks/configure-opnfvhost.yml
index 28e6b2178..af90c9dc0 100644
--- a/prototypes/xci/playbooks/configure-opnfvhost.yml
+++ b/prototypes/xci/playbooks/configure-opnfvhost.yml
@@ -55,8 +55,12 @@
shell: ssh-keygen -b 2048 -t rsa -f /root/.ssh/id_rsa -q -N ""
args:
creates: /root/.ssh/id_rsa
+ - name: ensure ssh key storage directory exists
+ file:
+ path: "{{ OPNFV_SSH_HOST_KEYS_PATH }}"
+ state: directory
- name: fetch public key
- fetch: src="/root/.ssh/id_rsa.pub" dest="/"
+ fetch: src="/root/.ssh/id_rsa.pub" dest="{{ OPNFV_SSH_HOST_KEYS_PATH }}"
- name: copy flavor inventory
shell: "/bin/cp -rf {{XCI_FLAVOR_ANSIBLE_FILE_PATH}}/inventory {{OPNFV_RELENG_PATH}}/prototypes/xci/playbooks"
- name: copy flavor vars
@@ -89,8 +93,10 @@
chdir: "{{OPENSTACK_OSA_PATH}}/scripts"
- hosts: localhost
remote_user: root
+ vars_files:
+ - ../var/opnfv.yml
tasks:
- name: Generate authorized_keys
- shell: "/bin/cat /opnfv/root/.ssh/id_rsa.pub >> ../file/authorized_keys"
+ shell: "/bin/cat {{ OPNFV_SSH_HOST_KEYS_PATH }}/opnfv/root/.ssh/id_rsa.pub >> ../file/authorized_keys"
- name: Append public keys to authorized_keys
shell: "/bin/cat /root/.ssh/id_rsa.pub >> ../file/authorized_keys"
diff --git a/prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml b/prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml
index ac8c0f7dc..425b8dbf4 100644
--- a/prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml
+++ b/prototypes/xci/playbooks/roles/remove-folders/tasks/main.yml
@@ -18,3 +18,4 @@
- "{{ OPENSTACK_OSA_PATH }}"
- "{{ OPENSTACK_OSA_ETC_PATH }}"
- "{{ LOG_PATH }} "
+ - "{{ OPNFV_SSH_HOST_KEYS_PATH }}"