mirror of
https://github.com/ansible-collections/hetzner.hcloud
synced 2024-11-10 06:34:13 +00:00
chore: add ansible-lint pre-commit hook (#293)
* chore: add ansible-lint pre-commit hook * chore: galaxy.yml license field should be a list * chore: fix ansible-lint errors
This commit is contained in:
parent
ff539800aa
commit
59fe4339d4
35 changed files with 303 additions and 225 deletions
40
.ansible-lint
Normal file
40
.ansible-lint
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue