From ab5a894780225b1bb288bb17d200ab697b191512 Mon Sep 17 00:00:00 2001 From: = Date: Thu, 24 Dec 2020 13:11:31 +0100 Subject: [PATCH] added k3s groups and initial state --- dnsmasq/files/hosts | 1 + {common => k3s}/files/etc/sysconfig/network/config | 0 k3s/firewalld.sls | 7 +++++++ k3s/init.sls | 3 +++ {common => k3s}/network.sls | 2 +- top.sls | 6 +++--- 6 files changed, 15 insertions(+), 4 deletions(-) rename {common => k3s}/files/etc/sysconfig/network/config (100%) create mode 100644 k3s/firewalld.sls create mode 100644 k3s/init.sls rename {common => k3s}/network.sls (81%) diff --git a/dnsmasq/files/hosts b/dnsmasq/files/hosts index 10afb08..a72c5dd 100644 --- a/dnsmasq/files/hosts +++ b/dnsmasq/files/hosts @@ -26,6 +26,7 @@ ff02::3 ipv6-allhosts 10.2.0.15 cumin 10.2.0.16 curry 10.2.0.17 chervil +10.2.0.18 basil 10.2.0.101 salt 10.2.0.102 pepper # MetalLB diff --git a/common/files/etc/sysconfig/network/config b/k3s/files/etc/sysconfig/network/config similarity index 100% rename from common/files/etc/sysconfig/network/config rename to k3s/files/etc/sysconfig/network/config diff --git a/k3s/firewalld.sls b/k3s/firewalld.sls new file mode 100644 index 0000000..7bf08a8 --- /dev/null +++ b/k3s/firewalld.sls @@ -0,0 +1,7 @@ +Stop firewalld if running: + service.dead: + - name: firewalld + +Disable firewalld: + service.disabled: + - name: firewalld diff --git a/k3s/init.sls b/k3s/init.sls new file mode 100644 index 0000000..1ceddc2 --- /dev/null +++ b/k3s/init.sls @@ -0,0 +1,3 @@ +include: + - k3s.firewalld + - k3s.network diff --git a/common/network.sls b/k3s/network.sls similarity index 81% rename from common/network.sls rename to k3s/network.sls index d47e31f..b912587 100644 --- a/common/network.sls +++ b/k3s/network.sls @@ -1,7 +1,7 @@ configure /etc/sysconfig/network/config: file.managed: - name: /etc/sysconfig/network/config - - source: salt://common/files/etc/sysconfig/network/config + - source: salt://k3s/files/etc/sysconfig/network/config - user: root - group: root - mode: "0644" diff --git a/top.sls b/top.sls index 52ab821..047a968 100644 --- a/top.sls +++ b/top.sls @@ -2,7 +2,6 @@ base: '*': - common.groups - common.users - - common.network - sudo - ssh @@ -12,5 +11,6 @@ base: 'salt.rre.nu': - dnsmasq - 'N@master or N@workers': - - k3s.dns + 'k3s': + - match: nodegroup + - k3s