summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/include_import/playbook/test_templated_filenames.yml
blob: 2f78ab098b8bcaf1c97791bdf32c8dbef54c88ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
- name: test templating import_playbook with extra vars
  import_playbook: "{{ pb }}"

- name: test templating import_playbook with vars
  import_playbook: "{{ test_var }}"
  vars:
    test_var: validate_templated_playbook.yml

- name: test templating import_tasks
  hosts: localhost
  gather_facts: no
  vars:
    play_var: validate_templated_tasks.yml
  tasks:
    - name: test templating import_tasks with play vars
      import_tasks: "{{ play_var }}"

    - name: test templating import_tasks with task vars
      import_tasks: "{{ task_var }}"
      vars:
        task_var: validate_templated_tasks.yml

    - name: test templating import_tasks with extra vars
      import_tasks: "{{ tasks }}"

- name: test templating import_role from_files
  hosts: localhost
  gather_facts: no
  vars:
    play_var: templated.yml
  tasks:
    - name: test templating import_role tasks_from with play vars
      import_role:
        name: role1
        tasks_from: "{{ play_var }}"

    - name: test templating import_role tasks_from with task vars
      import_role:
        name: role1
        tasks_from: "{{ task_var }}"
      vars:
        task_var: templated.yml

    - name: test templating import_role tasks_from with extra vars
      import_role:
        name: role1
        tasks_from: "{{ tasks_from }}"