summaryrefslogtreecommitdiffstats
path: root/xci/installer/osa/playbooks/configure-targethosts.yml
diff options
context:
space:
mode:
Diffstat (limited to 'xci/installer/osa/playbooks/configure-targethosts.yml')
-rw-r--r--xci/installer/osa/playbooks/configure-targethosts.yml32
1 files changed, 2 insertions, 30 deletions
diff --git a/xci/installer/osa/playbooks/configure-targethosts.yml b/xci/installer/osa/playbooks/configure-targethosts.yml
index b76a5950..cb817cfc 100644
--- a/xci/installer/osa/playbooks/configure-targethosts.yml
+++ b/xci/installer/osa/playbooks/configure-targethosts.yml
@@ -33,33 +33,5 @@
- xci_ceph_enabled == "true"
- "'compute' in group_names"
tasks:
- - name: Determine local user
- become: no
- local_action: command whoami
- changed_when: False
- register: _ansible_user
-
- - name: Fetch local SSH key
- delegate_to: localhost
- become: no
- slurp:
- src: "/home/{{ _ansible_user.stdout }}/.ssh/id_rsa.pub"
- register: _local_ssh_key
-
- - name: Fetch OPNFV SSH key
- delegate_to: opnfv
- slurp:
- src: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
- register: _opnfv_ssh_key
-
- - name: "Configure {{ inventory_hostname }} authorized_keys file"
- authorized_key:
- exclusive: "{{ item.exclusive }}"
- user: root
- state: present
- manage_dir: yes
- key: "{{ item.key }}"
- comment: "{{ item.comment }}"
- with_items:
- - { key: "{{ _local_ssh_key['content'] | b64decode }}", comment: "{{ _ansible_user.stdout }} key", exclusive: yes }
- - { key: "{{ _opnfv_ssh_key['content'] | b64decode }}", comment: "opnfv host key", exclusive: no }
+ - name: Manage SSH keys
+ include_tasks: "{{ xci_path }}/xci/playbooks/manage-ssh-keys.yml"