Debian Codegraph @

ansible_collections/hetzner/hcloud/tests/integration/common/tasks/main.yml

raw
1 ---
2 - name: Check if cleanup.yml exists
3 ansible.builtin.stat:
4 path: "{{ role_path }}/tasks/cleanup.yml"
5 register: cleanup_file
6
7 - name: Check if prepare.yml exists
8 ansible.builtin.stat:
9 path: "{{ role_path }}/tasks/prepare.yml"
10 register: prepare_file
11
12 - name: Include cleanup tasks
13 ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml"
14 when: cleanup_file.stat.exists
15
16 - name: Include prepare tasks
17 ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml"
18 when: prepare_file.stat.exists
19
20 - name: Run tests
21 block:
22 - name: Include test tasks
23 ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml"
24
25 always:
26 - name: Include cleanup tasks
27 ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml"
28 when: cleanup_file.stat.exists