File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -60,16 +60,24 @@ if [ -z "${ADMIN_PASSWORD+x}" ]; then
6060 ADMIN_PASSWORD=" admin"
6161fi
6262
63- echo " PMM Server IP is: $PMM_SERVER_IP "
64- echo " PMM Client version is: $PMM_CLIENT_VERSION "
65- echo " Admin Password is: $ADMIN_PASSWORD "
66- ansible_out=$( ansible-playbook install_pmm_client.yml -vvv --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 -e " container_name=psmdb-server pmm_server_ip=$PMM_SERVER_IP client_version=$PMM_CLIENT_VERSION admin_password=$ADMIN_PASSWORD " 2>&1 )
6763
6864random_number=$RANDOM
6965nodes=" rs101 rs102 rs103"
7066for node in $nodes
7167do
72- echo " configuring pmm agent on $node "
68+ echo " Configuring PMM Client on: $node "
69+ echo " PMM Server IP is: $PMM_SERVER_IP "
70+ echo " PMM Client version is: $PMM_CLIENT_VERSION "
71+ echo " Admin Password is: $ADMIN_PASSWORD "
72+ ansible_out=$( ansible-playbook install_pmm_client.yml -vvv --connection=local --inventory 127.0.0.1, --limit 127.0.0.1 -e " container_name=$node pmm_server_ip=$PMM_SERVER_IP client_version=$PMM_CLIENT_VERSION admin_password=$ADMIN_PASSWORD " 2>&1 )
73+
74+ if [ $? -ne 0 ]; then
75+ echo " Ansible failed for: $node "
76+ echo " $ansible_out "
77+ exit 1
78+ fi
79+
80+
7381 if [[ $mongo_setup_type == " psa" && $node == " rs103" ]]; then
7482 docker compose -f docker-compose-rs.yaml exec -T $node pmm-admin add mongodb --enable-all-collectors --agent-password=mypass --environment=psmdb-dev --cluster=replicaset --replication-set=rs --host=${node} --port=27017 ${node}${gssapi_service_name_part} _${random_number}
7583 else
You can’t perform that action at this time.
0 commit comments