add zabbix env file creation step

This commit is contained in:
tolerryan
2024-12-15 00:00:17 -06:00
parent 931eedf47d
commit 2d1beb64fb
2 changed files with 10 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ IP=$1
KEY_FILE="~/.ssh/setuproot.key.priv"
PLAYBOOK="./.ansible.d/setup.yml"
until /dev/tcp/$IP/22; do
until nc -z -w $timeout $host $port; do
echo "Attempting connection to $IP. For first setup script."
ansible-playbook --key-file "$KEY_FILE" -i "$IP," "$PLAYBOOK"
echo "Connection attempt failed. Retrying in 1 second."

View File

@@ -140,6 +140,14 @@
group: docker
mode: u=rw,g=r,o=r
- name: Write docker-compose.env
ansible.builtin.copy:
src: docker-compose.env
dest: /home/promgraf/docker-compose.env
owner: promgraf
group: docker
mode: u=rw,g=r,o=r
- name: Check if zabbix directory exists
stat:
path: /zabbix