Skip to content
Snippets Groups Projects
Commit e8efa127 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

feat: add node exporter ansible role when enable

parent 6375a047
No related tags found
No related merge requests found
......@@ -199,6 +199,9 @@ deploy_http_proxy_node:
[$ENV]
127.0.0.1
EEOF
if [ ${ENABLE_NODE_EXPORTER:-false} = true ]; then
sed -i -E "s|(enable_node_exporter: ).*|\1true|" ansible/group_vars/all
fi
ansible-playbook -c local -i ansible/hosts --extra-vars="$EXTRA_VARS" ansible/cluster.yml | tee -a /tmp/ansible.log
rm -rf /tmp/${CI_PROJECT_NAME}
EOF
......@@ -253,6 +256,9 @@ deploy_ssh_proxy_node:
[$ENV]
127.0.0.1
EEOF
if [ ${ENABLE_NODE_EXPORTER:-false} = true ]; then
sed -i -E "s|(enable_node_exporter: ).*|\1true|" ansible/group_vars/all
fi
ansible-playbook -c local -i ansible/hosts --extra-vars="$EXTRA_VARS" ansible/cluster.yml | tee -a /tmp/ansible.log
rm -rf /tmp/${CI_PROJECT_NAME}
EOF
......@@ -306,6 +312,9 @@ deploy_login_node:
[$ENV]
127.0.0.1
EEOF
if [ ${ENABLE_NODE_EXPORTER:-false} = true ]; then
sed -i -E "s|(enable_node_exporter: ).*|\1true|" ansible/group_vars/all
fi
s3cmd get --force -r --access_key=$AWS_ACCESS_KEY_ID --secret_key=$AWS_SECRET_ACCESS_KEY --host=$AWS_HOST --host-bucket=$AWS_HOST s3://cheaha-cloud-ansible-files/ /tmp/${CI_PROJECT_NAME}/ansible/files/
ansible-playbook -c local -i ansible/hosts --extra-vars="$EXTRA_VARS" ansible/cluster.yml | tee -a /tmp/ansible.log
rm -rf /tmp/${CI_PROJECT_NAME}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment