Add SSH key to execturo
Change-Id: I7e39a1c7e46312346f73d17711f552c8e10f9301
This commit is contained in:
parent
0c8f31d6c5
commit
b1b03f0dc0
@ -33,6 +33,21 @@
|
|||||||
src: "{{ ansible_user_dir }}/.cache/molecule/{{ zuul.project.short_name }}/default/instance_config.yml"
|
src: "{{ ansible_user_dir }}/.cache/molecule/{{ zuul.project.short_name }}/default/instance_config.yml"
|
||||||
register: _molecule_instance_config
|
register: _molecule_instance_config
|
||||||
|
|
||||||
|
- name: Grab the Molecule SSH key
|
||||||
|
slurp:
|
||||||
|
src: "{{ ansible_user_dir }}/.cache/molecule/{{ zuul.project.short_name }}/default/id_rsa"
|
||||||
|
register: _molecule_ssh_key
|
||||||
|
|
||||||
|
- name: Copy the SSH key down to exector
|
||||||
|
fetch:
|
||||||
|
src: "{{ ansible_user_dir }}/.cache/molecule/{{ zuul.project.short_name }}/default/id_rsa"
|
||||||
|
dest: "{{ ansible_user_dir }}/.ssh/id_molecule"
|
||||||
|
flat: yes
|
||||||
|
|
||||||
|
- name: Add SSH key to the executor
|
||||||
|
delegate_to: localhost
|
||||||
|
command: ssh-add {{ ansible_user_dir }}/.ssh/id_molecule
|
||||||
|
|
||||||
- name: Add all of the hosts to the inventory
|
- name: Add all of the hosts to the inventory
|
||||||
add_host:
|
add_host:
|
||||||
name: "{{ item.instance }}"
|
name: "{{ item.instance }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user