summaryrefslogtreecommitdiff
path: root/test/samples/with_subelements.yml
blob: 0037f4a63110358e57b3f56ba33cc8da69a1f06d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
- hosts: localhost
  connection: local
  gather_facts: no
  vars:
    users:
      - name: alice
        authorized:
          - /tmp/alice/onekey.pub
          - /tmp/alice/twokey.pub
      - name: bob
        authorized:
          - /tmp/bob/id_rsa.pub

  tasks:
  - debug: msg="user={{ item.0.name }} key='{{ item.1 }}'"
    with_subelements:
    - "{{ users }}"
    - authorized