fix local action

master
Michael Wilson 3 years ago
parent c09e37eb49
commit 366374bfea
  1. 15
      hetzner/autoinstall/tasks/unlock.yml

@ -11,14 +11,13 @@
delegate_to: localhost
- name: test ssh connection with {{ ansible_user }}
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
local_action: |
ansible.builtin.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
register: connection_test
ignore_errors: yes

Loading…
Cancel
Save