Commit dce5a59b authored by rlacko's avatar rlacko 💬
Browse files

Remove netplan

parent 4de5950b
---
# Dependent roles will be installed first
- name: Update netplan config
include_tasks: netplan.yaml
when: netplan is defined
- name: Setup nftables
include_tasks: nftables.yaml
when: nftables is defined
......
---
- name: Disable cloud init networking
template:
src: etc/cloud/cloud.cfg.d/99-disable-network-config.cfg.j2
dest: /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
mode: 0644
- name: Add netplan network config
template:
src: etc/netplan/01-netcfg.yaml.j2
dest: /etc/netplan/01-netcfg.yaml
mode: 0644
register: netplan_config
- name: Remove old netplan config
ansible.builtin.file:
path: /etc/netplan/50-cloud-init.yaml
state: absent
when: netplan_config.changed
- name: Apply Netplan Configuration
command: netplan apply
when: netplan_config.changed
\ No newline at end of file
#
# !!!
# {{ ansible_managed }}
# !!!
# Disable cloudinit network config
network: {config: disabled}
#
# !!!
# {{ ansible_managed }}
# !!!
network:
version: 2
renderer: networkd
ethernets:
{{ netplan['network']['ethernets']|to_nice_yaml|indent(4, true) }}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment