diff --git a/.ansible-lint b/.ansible-lint new file mode 100644 index 0000000..9c259a7 --- /dev/null +++ b/.ansible-lint @@ -0,0 +1,40 @@ +--- +exclude_paths: + - .azure-pipelines + - .cache/ + - .git/ + - .github/ + - changelogs/ + - tests/integration/targets/hcloud_certificate + - tests/integration/targets/hcloud_certificate_info + - tests/integration/targets/hcloud_datacenter_info + - tests/integration/targets/hcloud_firewall + - tests/integration/targets/hcloud_floating_ip + - tests/integration/targets/hcloud_floating_ip_info + - tests/integration/targets/hcloud_image_info + - tests/integration/targets/hcloud_iso_info + - tests/integration/targets/hcloud_load_balancer + - tests/integration/targets/hcloud_load_balancer_info + - tests/integration/targets/hcloud_load_balancer_network + - tests/integration/targets/hcloud_load_balancer_service + - tests/integration/targets/hcloud_load_balancer_target + - tests/integration/targets/hcloud_load_balancer_type_info + - tests/integration/targets/hcloud_location_info + - tests/integration/targets/hcloud_network + - tests/integration/targets/hcloud_network_info + - tests/integration/targets/hcloud_placement_group + - tests/integration/targets/hcloud_primary_ip + - tests/integration/targets/hcloud_primary_ip_info + - tests/integration/targets/hcloud_rdns + - tests/integration/targets/hcloud_route + - tests/integration/targets/hcloud_server + - tests/integration/targets/hcloud_server_info + - tests/integration/targets/hcloud_server_network + - tests/integration/targets/hcloud_server_type_info + - tests/integration/targets/hcloud_ssh_key + - tests/integration/targets/hcloud_ssh_key_info + - tests/integration/targets/hcloud_subnetwork + - tests/integration/targets/hcloud_volume + - tests/integration/targets/hcloud_volume_info + - tests/integration/targets/setup_selfsigned_certificate + - tests/integration/targets/setup_ssh_keypair diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 632d6b1..1f593be 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -49,6 +49,12 @@ repos: - id: antsibull-changelog-lint - id: antsibull-changelog-lint-changelog-yaml + - repo: https://github.com/ansible/ansible-lint + rev: v6.17.2 + hooks: + - id: ansible-lint + name: ansible-lint + - repo: local hooks: - id: shfmt diff --git a/galaxy.yml b/galaxy.yml index 7303a17..e06b169 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -5,7 +5,7 @@ readme: README.md authors: - Hetzner Cloud (github.com/hetznercloud) description: A Collection for managing Hetzner Cloud resources -license: GPL-3.0-or-later +license: [GPL-3.0-or-later] tags: - hetzner - cloud diff --git a/tests/integration/common/tasks/main.yml b/tests/integration/common/tasks/main.yml index 88cb1bf..c3f93a3 100644 --- a/tests/integration/common/tasks/main.yml +++ b/tests/integration/common/tasks/main.yml @@ -1,27 +1,28 @@ --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_certificate/tasks/main.yml b/tests/integration/targets/hcloud_certificate/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_certificate/tasks/main.yml +++ b/tests/integration/targets/hcloud_certificate/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_certificate_info/tasks/main.yml b/tests/integration/targets/hcloud_certificate_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_certificate_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_certificate_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_datacenter_info/tasks/main.yml b/tests/integration/targets/hcloud_datacenter_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_datacenter_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_datacenter_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_firewall/tasks/main.yml b/tests/integration/targets/hcloud_firewall/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_firewall/tasks/main.yml +++ b/tests/integration/targets/hcloud_firewall/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_floating_ip/tasks/main.yml +++ b/tests/integration/targets/hcloud_floating_ip/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_floating_ip_info/tasks/main.yml b/tests/integration/targets/hcloud_floating_ip_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_floating_ip_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_floating_ip_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_image_info/tasks/main.yml b/tests/integration/targets/hcloud_image_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_image_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_image_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_iso_info/tasks/main.yml b/tests/integration/targets/hcloud_iso_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_iso_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_iso_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_load_balancer/tasks/main.yml b/tests/integration/targets/hcloud_load_balancer/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_load_balancer/tasks/main.yml +++ b/tests/integration/targets/hcloud_load_balancer/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_load_balancer_info/tasks/main.yml b/tests/integration/targets/hcloud_load_balancer_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_load_balancer_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_load_balancer_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_load_balancer_network/tasks/main.yml b/tests/integration/targets/hcloud_load_balancer_network/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_load_balancer_network/tasks/main.yml +++ b/tests/integration/targets/hcloud_load_balancer_network/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_load_balancer_service/tasks/main.yml b/tests/integration/targets/hcloud_load_balancer_service/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_load_balancer_service/tasks/main.yml +++ b/tests/integration/targets/hcloud_load_balancer_service/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_load_balancer_target/tasks/main.yml b/tests/integration/targets/hcloud_load_balancer_target/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_load_balancer_target/tasks/main.yml +++ b/tests/integration/targets/hcloud_load_balancer_target/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_load_balancer_type_info/tasks/main.yml b/tests/integration/targets/hcloud_load_balancer_type_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_load_balancer_type_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_load_balancer_type_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_location_info/tasks/main.yml b/tests/integration/targets/hcloud_location_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_location_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_location_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_network/tasks/main.yml b/tests/integration/targets/hcloud_network/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_network/tasks/main.yml +++ b/tests/integration/targets/hcloud_network/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_network_info/tasks/main.yml b/tests/integration/targets/hcloud_network_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_network_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_network_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_placement_group/tasks/main.yml b/tests/integration/targets/hcloud_placement_group/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_placement_group/tasks/main.yml +++ b/tests/integration/targets/hcloud_placement_group/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_primary_ip/tasks/main.yml b/tests/integration/targets/hcloud_primary_ip/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_primary_ip/tasks/main.yml +++ b/tests/integration/targets/hcloud_primary_ip/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_primary_ip_info/tasks/main.yml b/tests/integration/targets/hcloud_primary_ip_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_primary_ip_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_primary_ip_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_rdns/tasks/main.yml b/tests/integration/targets/hcloud_rdns/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_rdns/tasks/main.yml +++ b/tests/integration/targets/hcloud_rdns/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_route/tasks/main.yml b/tests/integration/targets/hcloud_route/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_route/tasks/main.yml +++ b/tests/integration/targets/hcloud_route/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_server/tasks/main.yml b/tests/integration/targets/hcloud_server/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_server/tasks/main.yml +++ b/tests/integration/targets/hcloud_server/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_server_info/tasks/main.yml b/tests/integration/targets/hcloud_server_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_server_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_server_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_server_network/tasks/main.yml b/tests/integration/targets/hcloud_server_network/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_server_network/tasks/main.yml +++ b/tests/integration/targets/hcloud_server_network/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_server_type_info/tasks/main.yml b/tests/integration/targets/hcloud_server_type_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_server_type_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_server_type_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_ssh_key/tasks/main.yml b/tests/integration/targets/hcloud_ssh_key/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_ssh_key/tasks/main.yml +++ b/tests/integration/targets/hcloud_ssh_key/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_ssh_key_info/tasks/main.yml b/tests/integration/targets/hcloud_ssh_key_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_ssh_key_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_ssh_key_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_subnetwork/tasks/main.yml b/tests/integration/targets/hcloud_subnetwork/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_subnetwork/tasks/main.yml +++ b/tests/integration/targets/hcloud_subnetwork/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_volume/tasks/main.yml b/tests/integration/targets/hcloud_volume/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_volume/tasks/main.yml +++ b/tests/integration/targets/hcloud_volume/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists diff --git a/tests/integration/targets/hcloud_volume_info/tasks/main.yml b/tests/integration/targets/hcloud_volume_info/tasks/main.yml index 18cb4be..767fc46 100644 --- a/tests/integration/targets/hcloud_volume_info/tasks/main.yml +++ b/tests/integration/targets/hcloud_volume_info/tasks/main.yml @@ -3,28 +3,29 @@ # --- - name: Check if cleanup.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/cleanup.yml" register: cleanup_file - name: Check if prepare.yml exists - stat: + ansible.builtin.stat: path: "{{ role_path }}/tasks/prepare.yml" register: prepare_file - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists - name: Include prepare tasks - ansible.builtin.include_tasks: prepare.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/prepare.yml" when: prepare_file.stat.exists -- block: +- name: Run tests + block: - name: Include test tasks - ansible.builtin.include_tasks: test.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/test.yml" always: - name: Include cleanup tasks - ansible.builtin.include_tasks: cleanup.yml + ansible.builtin.include_tasks: "{{ role_path }}/tasks/cleanup.yml" when: cleanup_file.stat.exists