- hosts: undercloud gather_facts: false tasks: - name: Pull the tripleo passwords from undercloud vm when: not multi_cell | default(False) | bool ansible.builtin.fetch: src: /home/zuul/overcloud-deploy/overcloud/overcloud-passwords.yaml dest: /home/zuul/overcloud-passwords.yaml flat: true - name: Pull the tripleo passwords from undercloud vm for a multi-stack when: multi_cell | default(False) | bool ansible.builtin.fetch: src: /home/zuul/{{ item.src }} dest: /home/zuul/{{ item.dst }} flat: true loop: - src: overcloud-deploy/overcloud/overcloud-passwords.yaml dst: overcloud-passwords.yaml - src: overcloud-deploy/cell1/cell1-passwords.yaml dst: cell1-passwords.yaml - src: overcloud-deploy/cell2/cell2-passwords.yaml dst: cell2-passwords.yaml - name: Pull the private key from undercloud ansible.builtin.fetch: src: /home/zuul/.ssh/id_rsa dest: /home/zuul/edpm_ssh_key flat: true - name: Slurp crc public key for ssh access to standalone delegate_to: localhost # localhost is the controller node in this case ansible.builtin.slurp: path: /home/zuul/.ssh/id_rsa.pub register: crc_ssh_key - name: Place crc public key to undercloud authorized_keys ansible.builtin.lineinfile: path: "/home/zuul/.ssh/authorized_keys" insertafter: "EOF" value: "{{ crc_ssh_key['content'] | b64decode | trim }}"