ansible_mitogen: Test templated connection user (e.g. ansible_user)

pull/1147/head
Alex Willmer 2 months ago
parent 2c4316fa16
commit 14cb8be7e5

@ -25,11 +25,10 @@ tt-bare
[tt_targets_bare:vars] [tt_targets_bare:vars]
ansible_host=localhost ansible_host=localhost
ansible_user=mitogen__has_sudo_nopw
[tt_targets_inventory] [tt_targets_inventory]
tt-password ansible_password="{{ 'has_sudo_nopw_password' | trim }}" tt-password ansible_password="{{ 'has_sudo_nopw_password' | trim }}" ansible_user=mitogen__has_sudo_nopw
tt-remote-user ansible_password=has_sudo_nopw_password ansible_user="{{ 'mitogen__has_sudo_nopw' | trim }}"
[tt_targets_inventory:vars] [tt_targets_inventory:vars]
ansible_host=localhost ansible_host=localhost
ansible_user=mitogen__has_sudo_nopw

@ -3,6 +3,7 @@
gather_facts: false gather_facts: false
vars: vars:
ansible_password: "{{ 'has_sudo_nopw_password' | trim }}" ansible_password: "{{ 'has_sudo_nopw_password' | trim }}"
ansible_user: "{{ 'mitogen__has_sudo_nopw' | trim }}"
tasks: tasks:
- meta: reset_connection - meta: reset_connection

@ -47,12 +47,11 @@ tt-bare
ansible_host={{ tt.hostname }} ansible_host={{ tt.hostname }}
ansible_port={{ tt.port }} ansible_port={{ tt.port }}
ansible_python_interpreter={{ tt.python_path }} ansible_python_interpreter={{ tt.python_path }}
ansible_user=mitogen__has_sudo_nopw
[tt_targets_inventory] [tt_targets_inventory]
tt-password ansible_password="{{ '{{' }} 'has_sudo_nopw_password' | trim {{ '}}' }}" ansible_port={{ tt.port }} tt-password ansible_password="{{ '{{' }} 'has_sudo_nopw_password' | trim {{ '}}' }}" ansible_port={{ tt.port }} ansible_user=mitogen__has_sudo_nopw
tt-remote-user ansible_password=has_sudo_nopw_password ansible_port={{ tt.port }} ansible_user="{{ '{{' }} 'mitogen__has_sudo_nopw' | trim {{ '}}' }}"
[tt_targets_inventory:vars] [tt_targets_inventory:vars]
ansible_host={{ tt.hostname }} ansible_host={{ tt.hostname }}
ansible_python_interpreter={{ tt.python_path }} ansible_python_interpreter={{ tt.python_path }}
ansible_user=mitogen__has_sudo_nopw

Loading…
Cancel
Save