add neko custom stuff
This commit is contained in:
5
roles/netplan/handlers/main.yaml
Normal file
5
roles/netplan/handlers/main.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
- name: "netplanapply"
|
||||
command: netplan apply
|
||||
async: 45
|
||||
poll: 0
|
16
roles/netplan/tasks/main.yaml
Normal file
16
roles/netplan/tasks/main.yaml
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
- name: "remove cloudinit config"
|
||||
file:
|
||||
path: /etc/netplan/50-cloud-init.yaml
|
||||
state: absent
|
||||
|
||||
- name: "remove installer config"
|
||||
file:
|
||||
path: /etc/netplan/00-installer-config.yaml
|
||||
state: absent
|
||||
|
||||
- name: "install static config"
|
||||
template:
|
||||
src: templates/netplan.yaml
|
||||
dest: /etc/netplan/00-static.yaml
|
||||
notify: netplanapply
|
11
roles/netplan/templates/netplan.yaml
Normal file
11
roles/netplan/templates/netplan.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
# {{ansible_managed}}
|
||||
network:
|
||||
version: 2
|
||||
renderer: networkd
|
||||
ethernets:
|
||||
ens192:
|
||||
dhcp4: true
|
||||
dhcp-identifier: mac
|
||||
dhcp4-overrides:
|
||||
use-routes: false
|
||||
gateway4: {{default_gateway}}
|
Reference in New Issue
Block a user