mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
524 B
YAML
24 lines
524 B
YAML
4 years ago
|
---
|
||
|
- 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'
|