From 81a37bf842f7b4285094cf7fa9c1eaeddf9ed652 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 29 Jan 2023 23:31:46 +0100 Subject: salt.minion: no longer manage grains Grains have only been managed to track roles, however those have since been moved to the Role API. Hence the managed /etc/salt/grains file can safely be removed from management. Existing installations will be cleaned up by me. Signed-off-by: Georg Pfuetzenreuter --- salt/profile/salt/files/etc/salt/grains.j2 | 9 --------- salt/profile/salt/grains.sls | 12 ------------ salt/profile/salt/minion.sls | 1 - 3 files changed, 22 deletions(-) delete mode 100644 salt/profile/salt/files/etc/salt/grains.j2 delete mode 100644 salt/profile/salt/grains.sls (limited to 'salt') diff --git a/salt/profile/salt/files/etc/salt/grains.j2 b/salt/profile/salt/files/etc/salt/grains.j2 deleted file mode 100644 index 74f3262..0000000 --- a/salt/profile/salt/files/etc/salt/grains.j2 +++ /dev/null @@ -1,9 +0,0 @@ -{%- set header = salt['pillar.get']('managed_header_pound') -%} -{%- set roles = salt['pillar.get']('netbox:config_context:roles', []) -%} -{{ header }} -{%- if roles is defined and roles %} -roles: - {%- for role in roles %} - - {{ role }} - {%- endfor %} -{% endif %} diff --git a/salt/profile/salt/grains.sls b/salt/profile/salt/grains.sls deleted file mode 100644 index 632a8bc..0000000 --- a/salt/profile/salt/grains.sls +++ /dev/null @@ -1,12 +0,0 @@ -salt_grains_file: - file.managed: - - user: root - - mode: '0644' - - template: jinja - - names: - - /etc/salt/grains: - - source: salt:///{{ slspath }}/files/etc/salt/grains.j2 - - require_in: - - service: salt-minion - - watch_in: - - service: salt-minion diff --git a/salt/profile/salt/minion.sls b/salt/profile/salt/minion.sls index 12bef1d..5d33845 100644 --- a/salt/profile/salt/minion.sls +++ b/salt/profile/salt/minion.sls @@ -18,5 +18,4 @@ - service: salt-minion include: - - .grains - salt.minion -- cgit v1.2.3