wildcard netplan config delete

This commit is contained in:
Cory Hawkless 2022-06-29 22:47:26 +09:30
parent 4b351ebfec
commit 6acbb03400
1 changed files with 12 additions and 12 deletions

View File

@ -19,23 +19,23 @@
state: absent
tags: interfaces
- name: Remove /etc/netplan/01-netcfg.yaml
file:
path: /etc/netplan/01-netcfg.yaml
state: absent
tags: interfaces
- name: Get directory stats
stat:
path: "/etc/netplan"
register: directory_stat
- name: Remove /etc/netplan/50-cloud-init.yaml
- name: Delete directory
file:
path: /etc/netplan/50-cloud-init.yaml
path: "/etc/netplan"
state: absent
tags: interfaces
- name: Remove /etc/netplan/00-installer-config.yaml
- name: Create directory
file:
path: /etc/netplan/00-installer-config.yaml
state: absent
tags: interfaces
path: "/etc/netplan"
state: directory
owner: "{{ directory_stat.stat.pw_name }}"
group: "{{ directory_stat.stat.gr_name }}"
mode: "{{ directory_stat.stat.mode }}"
- name: Add the bonding module
modprobe: