ansible_mitogen: Handle templated connection passwords and ansible_ssh_password
This switches `ansible_mitogen.transport_config.PlayContextSpec.password()` to Ansible's plugin option framework. As a result - The relatively recent `ansible_ssh_password` variable is now respected. - The SSH connection password can be templated and specified as a play variable. Task variables will probably also work, but testing was blocked by #1132. There is a chance this change will cause a regression in another connection plugin (e.g. mitogen_docker), but nothing turned up in the test suite. I intend ot migrate other connection configuration to `ansible_mitogen.transport_config.PlayContextSpec._connect_option()`, the next candidate is the remote port. fixes #1106pull/1114/head
parent
3bdd3e237a
commit
551690ee1d
@ -0,0 +1,7 @@
|
||||
- name: integration/ssh/templated_by_inv.yml
|
||||
hosts: tt_targets_inventory
|
||||
gather_facts: false
|
||||
tasks:
|
||||
- meta: reset_connection
|
||||
- name: Templated variables in inventory
|
||||
ping:
|
@ -0,0 +1,10 @@
|
||||
- name: integration/ssh/templated_by_play_taskvar.yml
|
||||
hosts: tt_targets_bare
|
||||
gather_facts: false
|
||||
vars:
|
||||
ansible_password: "{{ 'has_sudo_nopw_password' | trim }}"
|
||||
|
||||
tasks:
|
||||
- meta: reset_connection
|
||||
- name: Templated variables in play
|
||||
ping:
|
Loading…
Reference in New Issue