summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/connection_delegation/test.yml
blob: 678bef518b7bb50ff20d26175a036b6884325119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
- 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'