From c18389b3c521ff3a030fe875d190891d244420a1 Mon Sep 17 00:00:00 2001 From: = Date: Wed, 27 Jan 2021 15:12:21 +0100 Subject: [PATCH] manage the nodegroups --- .../files/etc/salt/master.d/nodegroups.conf | 18 ++++++++++++++++++ salt-master/init.sls | 1 + salt-master/reactors.sls | 12 ++++++------ 3 files changed, 25 insertions(+), 6 deletions(-) create mode 100644 salt-master/files/etc/salt/master.d/nodegroups.conf diff --git a/salt-master/files/etc/salt/master.d/nodegroups.conf b/salt-master/files/etc/salt/master.d/nodegroups.conf new file mode 100644 index 0000000..29bd9d9 --- /dev/null +++ b/salt-master/files/etc/salt/master.d/nodegroups.conf @@ -0,0 +1,18 @@ +nodegroups: + masters: + - cumin.rre.nu + - chervil.rre.nu + - curry.rre.nu + + workers: + - parsley.rre.nu + - basil.rre.nu + - habanero.rre.nu + + k3s: + - cumin.rre.nu + - chervil.rre.nu + - curry.rre.nu + - parsley.rre.nu + - basil.rre.nu + - habanero.rre.nu diff --git a/salt-master/init.sls b/salt-master/init.sls index 7679e6d..a4e7d4c 100644 --- a/salt-master/init.sls +++ b/salt-master/init.sls @@ -1,2 +1,3 @@ include: + - salt-master.nodegroups - salt-master.reactors diff --git a/salt-master/reactors.sls b/salt-master/reactors.sls index d21d348..bb07238 100644 --- a/salt-master/reactors.sls +++ b/salt-master/reactors.sls @@ -6,12 +6,6 @@ Create reactors master configuration: - group: root - mode: "0644" -restart master: - service.running: - - name: salt-master - - onchanges: - - file: Create reactors master configuration - Create reactors directory: file.directory: - name: /srv/reactor @@ -26,3 +20,9 @@ Create rfxcom reactor: - user: root - group: root - mode: "0644" + +#restart master to load reactors: +# service.running: +# - name: salt-master +# - onchanges: +# - file: Create reactors master configuration