Only add ssh keys if there is a valid ssh agent with keys
Change-Id: I3170bcab532396f21d1ae9adceebe7ad21c51e8e
This commit is contained in:
parent
ea20afb970
commit
e5e1ac7b0a
|
@ -16,6 +16,7 @@
|
||||||
become: false
|
become: false
|
||||||
register: ssh_pubkeys
|
register: ssh_pubkeys
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
failed_when: false
|
||||||
|
|
||||||
- name: Add SSH pubkey to authorized_keys
|
- name: Add SSH pubkey to authorized_keys
|
||||||
authorized_key:
|
authorized_key:
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
key: "{{ item }}"
|
key: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
with_items: "{{ ssh_pubkeys.stdout_lines }}"
|
with_items: "{{ ssh_pubkeys.stdout_lines }}"
|
||||||
changed_when: false
|
when: ssh_pubkeys.rc == 0
|
||||||
|
|
||||||
- include: process_certificates.yml
|
- include: process_certificates.yml
|
||||||
when: trust_self_signed_certs|bool
|
when: trust_self_signed_certs|bool
|
||||||
|
|
Loading…
Reference in New Issue