Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KSZK
Sysadmin
Kubernetes
Router Ansible Role
Commits
dce5a59b
Commit
dce5a59b
authored
Sep 16, 2021
by
rlacko
💬
Browse files
Remove netplan
parent
4de5950b
Changes
4
Hide whitespace changes
Inline
Side-by-side
tasks/main.yml
View file @
dce5a59b
---
# 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
...
...
tasks/netplan.yaml
deleted
100644 → 0
View file @
4de5950b
---
-
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
templates/etc/cloud/cloud.cfg.d/99-disable-network-config.cfg.j2
deleted
100644 → 0
View file @
4de5950b
#
# !!!
# {{ ansible_managed }}
# !!!
# Disable cloudinit network config
network: {config: disabled}
templates/etc/netplan/01-netcfg.yaml.j2
deleted
100644 → 0
View file @
4de5950b
#
# !!!
# {{ ansible_managed }}
# !!!
network:
version: 2
renderer: networkd
ethernets:
{{ netplan['network']['ethernets']|to_nice_yaml|indent(4, true) }}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment