diff --git a/ansible-scylla-monitoring/defaults/main.yml b/ansible-scylla-monitoring/defaults/main.yml index 6e91d9ee..bfd7809a 100644 --- a/ansible-scylla-monitoring/defaults/main.yml +++ b/ansible-scylla-monitoring/defaults/main.yml @@ -20,6 +20,9 @@ scylla_manager_ip: '127.0.0.1' # Download the scylla-monitoring from here scylla_monitoring_archive_url: 'https://github.com/scylladb/scylla-monitoring/archive/scylla-monitoring-3.10.1.tar.gz' +# The path where the role will look for config files +scylla_monitoring_role_config_path: "{{ inventory_dir }}" + scylla_monitoring_deploy_path: /opt/scylla-monitoring scylla_monitoring_data_path: "{{ scylla_monitoring_deploy_path }}/data" scylla_monitoring_config_path: "{{ scylla_monitoring_deploy_path }}/config" @@ -49,6 +52,7 @@ use_nodetool_status_with_genconfig: false # is always installed. # If below value is different from 'default' a corresponding file is going to be installed as 'userdefined.rules.yml' # in scylla_monitoring_prom_rules_path folder. +# The value should be a file path relative to 'scylla_monitoring_role_config_path'. prometheus_rules_file: default # Reject filter for alerts in the prometheus.rules.yml that comes as part of the Monitoring distribution. diff --git a/ansible-scylla-monitoring/tasks/common.yml b/ansible-scylla-monitoring/tasks/common.yml index 3fb75fce..6a6ee1f5 100644 --- a/ansible-scylla-monitoring/tasks/common.yml +++ b/ansible-scylla-monitoring/tasks/common.yml @@ -125,7 +125,7 @@ - name: set prometheus rules file from preset file copy: - src: "{{ prometheus_rules_file }}" + src: "{{ scylla_monitoring_role_config_path }}/{{ prometheus_rules_file }}" dest: "{{ scylla_monitoring_prom_rules_path }}/userdefined.rules.yml" mode: '0644' when: prometheus_rules_file is defined and prometheus_rules_file != 'default'