0
0

ft(ssh connection): test if connection is still valid

This commit is contained in:
Thomas Nyambati 2017-02-17 17:02:28 +03:00
parent 25294d025f
commit 0369d0a205

View File

@ -28,4 +28,5 @@
key: "{{ lookup('file', key_path + '.pub') }}"
- name: Test if the new ssh key is allowed to make connections
set_fact: ansible_private_ssh_key={{ lookup('file', key_path)}}
shell: ssh {{ssh_host_user }}@{{ inventory_hostname }} "echo success"
delegate_to: localhost