Bertrand Lanson
30ce327d55
All checks were successful
test / Linting (push) Successful in 18s
test / Molecule tests (default, debian11) (push) Successful in 47s
test / Molecule tests (default, debian12) (push) Successful in 53s
test / Molecule tests (default, ubuntu2204) (push) Successful in 49s
test / Molecule tests (default, ubuntu2004) (push) Successful in 1m21s
test / Molecule tests (with_custom_config, debian11) (push) Successful in 45s
test / Molecule tests (with_custom_config, debian12) (push) Successful in 49s
test / Molecule tests (with_custom_config, ubuntu2004) (push) Successful in 51s
test / Molecule tests (with_custom_config, ubuntu2204) (push) Successful in 46s
16 lines
454 B
YAML
16 lines
454 B
YAML
---
|
|
# task/remove_existing file for manage_netplan
|
|
- name: "Capturing existing configurations"
|
|
ansible.builtin.find:
|
|
paths: /etc/netplan
|
|
patterns: "*.yml,*.yaml"
|
|
register: _netplan_configs
|
|
|
|
- name: "Removing existing configurations"
|
|
ansible.builtin.file:
|
|
path: "{{ item['path'] }}"
|
|
state: absent
|
|
loop: "{{ _netplan_configs['files'] }}"
|
|
when: item['path'] != manage_netplan_config_file
|
|
and manage_netplan_configuration != []
|