From 8199744e9cee88127291b22ebeb9e78142cc4ade Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Tue, 3 Apr 2018 11:14:11 +0100 Subject: xci: osa: Move tasks for managing SSH keys to a new file The tasks that manage the SSH keys are common across hosts and also common across different installers. As such, lets move them to a new file so we can share them more easily. Change-Id: If235877394f224a47a2f2b8de748a2330eabcec1 Signed-off-by: Markos Chandras --- .../osa/playbooks/configure-opnfvhost.yml | 32 ++-------------------- 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'xci/installer/osa/playbooks/configure-opnfvhost.yml') diff --git a/xci/installer/osa/playbooks/configure-opnfvhost.yml b/xci/installer/osa/playbooks/configure-opnfvhost.yml index 11957cdc..6c2b1d35 100644 --- a/xci/installer/osa/playbooks/configure-opnfvhost.yml +++ b/xci/installer/osa/playbooks/configure-opnfvhost.yml @@ -43,15 +43,6 @@ proxy_settings_no_proxy: "{{ lookup('env','no_proxy') }}" tasks: - - name: Configure SSH key for root user - user: - name: root - generate_ssh_key: yes - ssh_key_bits: 2048 - ssh_key_comment: xci - ssh_key_type: rsa - state: present - - name: Copy releng-xci to remote host synchronize: src: "{{ xci_path }}/" @@ -206,24 +197,5 @@ dest: "{{ xci_path }}/.cache/openrc" flat: true - - 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: Configure OPNFV authorized_keys file - authorized_key: - exclusive: yes - user: root - state: present - manage_dir: yes - comment: "{{ _ansible_user.stdout }} key" - key: "{{ _local_ssh_key['content'] | b64decode }}" + - name: Manage SSH keys + include_tasks: "{{ xci_path }}/xci/playbooks/manage-ssh-keys.yml" -- cgit 1.2.3-korg