ansible/roles/network/tasks/netplan.yml

19 lines
498 B
YAML
Raw Normal View History

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
- 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 }}"
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