test fix for connection context

master
Michael Wilson 3 years ago
parent 6656623b92
commit c09e37eb49
  1. 16
      hetzner/autoinstall/tasks/unlock.yml

@ -11,16 +11,16 @@
delegate_to: localhost
- name: test ssh connection with {{ ansible_user }}
shell: |
ssh -p{{ ansible_ssh_port|default(22) }} \
-i {{ ansible_ssh_private_key_file }} \
-oStrictHostkeyChecking=no \
-oBatchMode=yes \
{{ ansible_user }}@{{ ansible_ssh_host }} echo test
local_action:
module: shell
command: |
ssh -p{{ ansible_ssh_port|default(22) }} \
-i {{ ansible_ssh_private_key_file }} \
-oStrictHostkeyChecking=no \
-oBatchMode=yes \
{{ ansible_user }}@{{ ansible_ssh_host }} echo test
register: connection_test
ignore_errors: yes
delegate_to: localhost
delegate_facts: yes
- name: set ansible_user
set_fact:

Loading…
Cancel
Save