Skip to content
Snippets Groups Projects
Commit dce5a59b authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Remove netplan

parent 4de5950b
No related branches found
No related tags found
No related merge requests found
---
# 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) }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment