Update setup for new format

This commit is contained in:
Mike Reeves
2020-05-08 11:16:26 -04:00
parent 986df0c573
commit 470046dda9
2 changed files with 6 additions and 5 deletions

View File

@@ -8,6 +8,6 @@ IPADDRESS=$2
if grep -q $2 "/opt/so/saltstack/pillar/firewall/$1.sls"; then if grep -q $2 "/opt/so/saltstack/pillar/firewall/$1.sls"; then
echo "Firewall Rule Already There" echo "Firewall Rule Already There"
else else
echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls echo " - $2" >> /opt/so/saltstack/pillar/firewall/$1.sls
salt-call state.apply firewall queue=True salt-call state.apply firewall queue=True
fi fi

View File

@@ -714,10 +714,11 @@ firewall_generate_templates() {
for i in analyst beats_endpoint forward_nodes master minions osquery_endpoint search_nodes wazuh_endpoint for i in analyst beats_endpoint forward_nodes master minions osquery_endpoint search_nodes wazuh_endpoint
do do
printf '%s\n'\ printf '%s\n'\
"firewall:" "firewall:"\
" $i:"\ " alias:"\
" ips:" \ " $i:"\
" - 127.0.0.1"\ " ips:" \
" - 127.0.0.1"\
"" > "$firewall_pillar_path"/$i.sls "" > "$firewall_pillar_path"/$i.sls
echo "Added $i Template" echo "Added $i Template"
done done