Skip to content

Commit

Permalink
Merge pull request #456 from gardar/prometheus-old-var
Browse files Browse the repository at this point in the history
fix(prometheus): remove old internal variable remnants
  • Loading branch information
gardar authored Nov 8, 2024
2 parents 2a37662 + 2faef08 commit 903392e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions roles/prometheus/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
owner: "{{ prometheus_system_user }}"
group: "{{ prometheus_system_group }}"
mode: 0640
validate: "{{ _prometheus_binary_install_dir }}/promtool check rules %s"
validate: "{{ prometheus_binary_install_dir }}/promtool check rules %s"
when:
- prometheus_alert_rules != []
- not prometheus_agent_mode
Expand All @@ -89,7 +89,7 @@
owner: "{{ prometheus_system_user }}"
group: "{{ prometheus_system_group }}"
mode: 0640
validate: "{{ _prometheus_binary_install_dir }}/promtool check rules %s"
validate: "{{ prometheus_binary_install_dir }}/promtool check rules %s"
loop: "{{ prometheus_alert_rules_files | map('ansible.builtin.fileglob') | flatten }}"
when:
- not prometheus_agent_mode
Expand All @@ -109,7 +109,7 @@
owner: "{{ prometheus_system_user }}"
group: "{{ prometheus_system_group }}"
mode: 0640
validate: "{{ _prometheus_binary_install_dir }}/promtool check config %s"
validate: "{{ prometheus_binary_install_dir }}/promtool check config %s"
no_log: "{{ false if (lookup('env', 'CI')) or (lookup('env', 'MOLECULE_PROVISIONER_NAME')) else true }}"
notify:
- reload prometheus
Expand Down
2 changes: 1 addition & 1 deletion roles/prometheus/templates/prometheus.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Environment="GOMAXPROCS={{ ansible_processor_vcpus|default(ansible_processor_cou
User={{ prometheus_system_user }}
Group={{ prometheus_system_group }}
ExecReload=/bin/kill -HUP $MAINPID
ExecStart={{ _prometheus_binary_install_dir }}/prometheus \
ExecStart={{ prometheus_binary_install_dir }}/prometheus \
{% if not prometheus_agent_mode %}
--storage.tsdb.path={{ prometheus_db_dir }} \
{% if prometheus_version is version('2.7.0', '>=') %}
Expand Down
1 change: 0 additions & 1 deletion roles/prometheus/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ _prometheus_go_ansible_arch: "{{ {'i386': '386',
'aarch64': 'arm64',
'armv7l': 'armv7',
'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}"
_prometheus_binary_install_dir: '/usr/local/bin'

_prometheus_repo: "prometheus/prometheus"
_github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}"
Expand Down

0 comments on commit 903392e

Please sign in to comment.