diff --git a/salt/pillars/network.sls b/salt/pillars/network.sls index 7fd51c9..45f1b65 100644 --- a/salt/pillars/network.sls +++ b/salt/pillars/network.sls @@ -1,5 +1,6 @@ network: domain: suse.lan + hostname: admin netaddress: 192.168.0.0 netmask: 24 ip: 192.168.0.1 @@ -7,3 +8,17 @@ network: interface: internal: eth0 external: eth0.1000 + + vlan: + - + id: 100 + address: 192.168.100.1 + netmask: 24 + - + id: 200 + address: 192.168.200.1 + netmask: 24 + - + id: 250 + address: 192.168.250.1 + netmask: 24 diff --git a/salt/states/top.sls b/salt/states/top.sls index a00987a..b265174 100644 --- a/salt/states/top.sls +++ b/salt/states/top.sls @@ -1,3 +1,5 @@ base: '*': + - hostname + - firewalld - chrony diff --git a/update.sh b/update.sh index 09578cb..8b5ae8f 100755 --- a/update.sh +++ b/update.sh @@ -40,23 +40,35 @@ function log(){ printf "%s\n" "$*" } -function parse_yaml { - local prefix=$2 - local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @|tr @ '\034') - sed -ne "s|^\($s\):|\1|" \ - -e "s|^\($s\)\($w\)$s:$s[\"']\(.*\)[\"']$s\$|\1$fs\2$fs\3|p" \ - -e "s|^\($s\)\($w\)$s:$s\(.*\)$s\$|\1$fs\2$fs\3|p" $1 | - awk -F$fs '{ - indent = length($1)/2; - vname[indent] = $2; - for (i in vname) {if (i > indent) {delete vname[i]}} - if (length($3) > 0) { - vn=""; for (i=0; i indent) {delete vname[i]}} + if (length($3) > 0) { + vn=""; for (i=0; i