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

Loading…
Cancel
Save