MOAR DEBUG
This commit is contained in:
19
playbooks/tests/debug_host_vars.yml
Normal file
19
playbooks/tests/debug_host_vars.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
- name: Ensure correct SSH user for all Linode hosts
|
||||||
|
hosts: debian_hosts
|
||||||
|
gather_facts: false
|
||||||
|
vars:
|
||||||
|
ansible_user: phlux
|
||||||
|
ansible_ssh_user: phlux
|
||||||
|
ansible_ssh_common_args: '-o StrictHostKeyChecking=no'
|
||||||
|
tasks:
|
||||||
|
- name: Test connectivity with correct user
|
||||||
|
ansible.builtin.ping:
|
||||||
|
register: ping_result
|
||||||
|
|
||||||
|
- name: Display connection results
|
||||||
|
ansible.builtin.debug:
|
||||||
|
msg: |
|
||||||
|
{{ inventory_hostname }}: {{ 'SUCCESS' if ping_result is succeeded else 'FAILED' }}
|
||||||
|
Connected as: {{ ansible_user }}
|
||||||
|
IP: {{ ansible_host }}
|
Reference in New Issue
Block a user