From fe7247f876eda74ac82f4a5046475eac7f41dc59 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 10 Dec 2021 15:28:40 -0500 Subject: [PATCH] update fw for receiver and add mine_functions for ip_addr --- salt/firewall/assigned_hostgroups.map.yaml | 3 +-- salt/salt/etc/minion.d/mine_functions.conf | 3 +++ salt/salt/minion.sls | 9 +++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 salt/salt/etc/minion.d/mine_functions.conf diff --git a/salt/firewall/assigned_hostgroups.map.yaml b/salt/firewall/assigned_hostgroups.map.yaml index e56b86277..e9727f331 100644 --- a/salt/firewall/assigned_hostgroups.map.yaml +++ b/salt/firewall/assigned_hostgroups.map.yaml @@ -620,17 +620,16 @@ role: search_node: portgroups: - {{ portgroups.redis }} - - {{ portgroups.minio }} - {{ portgroups.elasticsearch_node }} - {{ portgroups.beats_5644 }} heavy_node: portgroups: - {{ portgroups.redis }} - - {{ portgroups.minio }} - {{ portgroups.elasticsearch_node }} - {{ portgroups.beats_5644 }} self: portgroups: + - {{ portgroups.redis }} - {{ portgroups.syslog}} syslog: portgroups: diff --git a/salt/salt/etc/minion.d/mine_functions.conf b/salt/salt/etc/minion.d/mine_functions.conf new file mode 100644 index 000000000..42a543841 --- /dev/null +++ b/salt/salt/etc/minion.d/mine_functions.conf @@ -0,0 +1,3 @@ +mine_functions: + network.ip_addrs: + - interface: {{ pillar.host.mainint }} diff --git a/salt/salt/minion.sls b/salt/salt/minion.sls index 04fc1769c..22ea149bf 100644 --- a/salt/salt/minion.sls +++ b/salt/salt/minion.sls @@ -76,14 +76,23 @@ salt_minion_service_unit_file: - module: systemd_reload - listen_in: - service: salt_minion_service + {% endif %} +mine_functions: + file.managed: + - name: /etc/salt/minion.d/mine_functions.conf + - source: salt://salt/etc/mine_functions.conf + - template: jinja + # this has to be outside the if statement above since there are _in calls to this state salt_minion_service: service.running: - name: salt-minion - enable: True - onlyif: test "{{INSTALLEDSALTVERSION}}" == "{{SALTVERSION}}" + - watch: + - file: mine_functions patch_pkg: pkg.installed: