switching vps to be the icinga master

This commit is contained in:
2023-12-09 18:49:30 -05:00
parent 1333c3e4a0
commit fa41a5bfd3
8 changed files with 166 additions and 100 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/bash
{# code: lang=jinja-shell #}
if ! id icinga &>/dev/null; then
echo icinga user is missing
exit 1
fi
if [ -d /etc/icinga2/.git ]; then
echo already cloned
exit 1
fi
# show commands executed
set -x
# exit on errors
set -e
rm -rf /etc/icinga2
cd /etc/
git clone '{{ salt.pillar.get('icinga2:server:conf_git_url') }}' icinga2
chown -R icinga.icinga /etc/icinga2