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 != []
|