2019-08-25 02:07:11 +00:00
|
|
|
---
|
2022-08-31 17:39:41 +00:00
|
|
|
- name: Remove default netplan configuration
|
|
|
|
ansible.builtin.file:
|
|
|
|
path: "{{ network_netplan_default_config_path }}"
|
|
|
|
state: "{{ network_netplan_default_config_state | default('absent') }}"
|
|
|
|
owner: root
|
|
|
|
group: root
|
2024-04-14 22:23:27 +00:00
|
|
|
mode: '0400'
|
2022-08-31 17:39:41 +00:00
|
|
|
notify: netplan apply
|
|
|
|
|
2022-08-31 04:27:03 +00:00
|
|
|
- name: Configure netplan
|
2024-04-14 22:23:27 +00:00
|
|
|
ansible.builtin.copy:
|
2022-08-31 17:39:41 +00:00
|
|
|
dest: "{{ network_netplan_config_path }}"
|
2024-04-14 22:23:27 +00:00
|
|
|
content: "{{ network_netplan | to_nice_yaml }}"
|
2022-08-31 04:27:03 +00:00
|
|
|
owner: root
|
|
|
|
group: root
|
2024-04-14 22:23:27 +00:00
|
|
|
mode: '0400'
|
2019-08-25 02:07:11 +00:00
|
|
|
notify: netplan apply
|