ansible/test/integration/targets/connection_delegation/test.yml
Jordan Borean 3f22f79e73
Ensure -k is set to delegated hosts without a pass ()
* Ensure -k is set to delegated hosts without a pass

* Fix up some broken tests

* Update task_executor.py

one possible fix, the other is updating winrm to normalize on 'password' like the other connection plugins

* Add alias for winrm and fix incorrect assumption

* Make sure aliases are used for keyword options

* Conditionally run test if sshpass is present, fix sanity

Co-authored-by: Brian Coca <bcoca@users.noreply.github.com>
2020-08-08 09:06:32 +10:00

23 lines
524 B
YAML

---
- hosts: localhost
gather_facts: no
tasks:
- name: test connection receives -k from play_context when delegating
delegation_action:
delegate_to: my_host
register: result
- assert:
that:
- result.remote_password == 'my_password'
- name: ensure vars set for that host take precedence over -k
delegation_action:
delegate_to: my_host
vars:
ansible_password: other_password
register: result
- assert:
that:
- result.remote_password == 'other_password'