add zabbix env file creation step
This commit is contained in:
@@ -3,7 +3,7 @@ IP=$1
|
|||||||
KEY_FILE="~/.ssh/setuproot.key.priv"
|
KEY_FILE="~/.ssh/setuproot.key.priv"
|
||||||
PLAYBOOK="./.ansible.d/setup.yml"
|
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."
|
echo "Attempting connection to $IP. For first setup script."
|
||||||
ansible-playbook --key-file "$KEY_FILE" -i "$IP," "$PLAYBOOK"
|
ansible-playbook --key-file "$KEY_FILE" -i "$IP," "$PLAYBOOK"
|
||||||
echo "Connection attempt failed. Retrying in 1 second."
|
echo "Connection attempt failed. Retrying in 1 second."
|
||||||
|
|||||||
@@ -140,6 +140,14 @@
|
|||||||
group: docker
|
group: docker
|
||||||
mode: u=rw,g=r,o=r
|
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
|
- name: Check if zabbix directory exists
|
||||||
stat:
|
stat:
|
||||||
path: /zabbix
|
path: /zabbix
|
||||||
|
|||||||
Reference in New Issue
Block a user