File tree Expand file tree Collapse file tree
ansible-scylla-monitoring Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ scylla_monitoring_archive_url: 'https://github.com/scylladb/scylla-monitoring/ar
2424scylla_monitoring_role_config_path : " {{ inventory_dir }}"
2525
2626scylla_monitoring_deploy_path : /opt/scylla-monitoring
27+ scylla_monitoring_start_script_path : " {{ scylla_monitoring_deploy_path }}/start-monitoring.sh"
28+ scylla_monitoring_stop_script_path : " {{ scylla_monitoring_deploy_path }}/stop-monitoring.sh"
2729scylla_monitoring_data_path : " {{ scylla_monitoring_deploy_path }}/data"
2830scylla_monitoring_config_path : " {{ scylla_monitoring_deploy_path }}/config"
2931scylla_monitoring_prom_rules_path : " {{ scylla_monitoring_config_path }}/prom_rules"
Original file line number Diff line number Diff line change 3131 when : " 'cql_credentials' in groups and item.split('=')[0] == scylla_monitoring_cql_default_user | default('scylla_cql_monitor')"
3232 loop : " {{ groups['cql_credentials'] }}"
3333
34+ - name : " docker.yml: Write stop monitoring wrapper script"
35+ template :
36+ src : stop-monitoring.sh.j2
37+ dest : " {{ scylla_monitoring_stop_script_path }}"
38+ mode : ' 0750'
39+ owner : " {{ ansible_user_id }}"
40+
41+ - name : " docker.yml: Write start monitoring wrapper script"
42+ template :
43+ src : start-monitoring.sh.j2
44+ dest : " {{ scylla_monitoring_start_script_path }}"
45+ mode : ' 0750'
46+ owner : " {{ ansible_user_id }}"
47+
3448- name : " docker.yml: restart the docker daemon again"
3549 service :
3650 name : docker
4963 when : ansible_facts.services["docker.service"] is defined
5064
5165- name : " docker.yml: Stop monitoring"
52- shell : |
53- cd {{ base_dir }}
54- ./kill-all.sh
55- sudo ./kill-all.sh
66+ command : " {{ scylla_monitoring_stop_script_path }}"
5667
5768- name : " docker.yml: start scylla-monitoring"
58- shell : " {{ start_command }}"
59- args :
60- chdir : " {{ base_dir }}"
69+ command : " {{ scylla_monitoring_start_script_path }}"
6170 become : " {{ 'true' if run_docker_with_sudo is defined and run_docker_with_sudo|bool == True else 'false' }}"
62- environment :
63- SCYLLA_USER : " {% if monitoring_cql_username is defined and monitoring_cql_password is defined %}{{ monitoring_cql_username }}{% endif %}"
64- SCYLLA_PSSWD : " {% if monitoring_cql_username is defined and monitoring_cql_password is defined %}{{ monitoring_cql_password }}{% endif %}"
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+ cd {{ base_dir }}
4+ {% if monitoring_cql_username is defined and monitoring_cql_password is defined %}
5+ export SCYLLA_USER=' {{ monitoring_cql_username }}'
6+ export SCYLLA_PSSWD=' {{ monitoring_cql_password }}'
7+ {% endif %}
8+ {{ start_command }}
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+ cd {{ base_dir }}
4+ ./kill-all.sh || true
5+ sudo ./kill-all.sh || true
You can’t perform that action at this time.
0 commit comments