Commit 7293e384 authored by Andreas Schmidt's avatar Andreas Schmidt

Update network state to properly handle netplan in 18.04.

parent 5a4da789
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: yes
dhcp6: no
wifis:
wlan0:
access-points:
LARN-5GHz:
password: "larn1914"
dhcp4: true
{%- if grains['osrelease'] == '16.04' %}
network-manager:
pkg.purged
......@@ -10,3 +11,20 @@ network_interface_eth0:
file.managed:
- name: /etc/network/interfaces.d/eth0
- source: salt://network/files/eth0
{%- endif %}
{%- if grains['osrelease'] == '18.04' %}
netplan_cfg:
file.recurse:
- name: /etc/netplan
- source: salt://network/files/netplan
- user: root
- group: root
- file_mode: keep
netplan_run:
cmd.run:
- name: netplan generate && netplan apply
- onchanges:
- file: netplan_cfg
{%- endif %}
include:
- network
{%- if grains['osrelease'] == '16.04' %}
wpasupplicant:
pkg.installed
......@@ -13,3 +14,4 @@ wpa_supplication.conf:
file.managed:
- name: /etc/wpa_supplicant/wpa_supplicant.conf
- source: salt://network/files/wpa_supplicant.conf
{%- endif %}
Markdown is supported
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