- name: Verify-User
local_action: shell ssh -o PreferredAuthentications=publickey -o StrictHostKeyChecking=no -i {{ role_path }}/files/authorized_keys.ansible -o ConnectTimeout=10 {{ createuser }}@{{ node }} "echo success"
register: user_enabled
ignore_errors: yes
ansible-playbook -i "1.0.0.0," setup-host.yml --extra-vars "node=1.0.0.0, ansible_connection=ssh ansible_ssh_user=root ansible_ssh_pass=test"
hosts": {
"1.0.0.0": {
"changed": false,
"msg": "Failed to connect to the host via ssh: ssh: connect to host localhost port 22: Connection refused\r\n",
"unreachable": true
}
}