homeserver/roles/mgrote_netplan/tasks/netplan.yml
Michael Grote 4a507b9dc6 configure netplan (#610)
Reviewed-on: #610
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
2023-11-24 14:11:59 +01:00

27 lines
544 B
YAML

---
- name: Install netplan
become: true
ansible.builtin.apt:
name:
- netplan.io
state: present
- name: Template netplan-config
become: true
ansible.builtin.template:
src: 10_config.yml.j2
dest: /etc/netplan/00-installer-config.yaml
owner: root
group: root
mode: '0400'
notify: netplan apply
- name: Ensure default config is absent
become: true
ansible.builtin.file:
path: "/etc/netplan/{{ item }}"
state: absent
notify: netplan apply
loop:
- 10_config.yml
- 01-netcfg.yaml