prometheus: Make version configurable
This commit is contained in:
parent
04e140c8d5
commit
baab3192b0
1 changed files with 10 additions and 3 deletions
|
@ -16,7 +16,12 @@
|
|||
|
||||
- name: Extract package
|
||||
ansible.builtin.unarchive:
|
||||
src: https://github.com/prometheus/prometheus/releases/download/v2.45.0/prometheus-2.45.0.linux-amd64.tar.gz
|
||||
src: >-
|
||||
{{
|
||||
"https://github.com/prometheus/prometheus/releases/download/v" +
|
||||
prometheus_version + "/prometheus-" + prometheus_version +
|
||||
".linux-amd64.tar.gz"
|
||||
}}
|
||||
dest: /usr/local/src
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
|
@ -25,11 +30,13 @@
|
|||
- name: Copy binaries
|
||||
ansible.builtin.copy:
|
||||
dest: "/usr/local/sbin/{{ item }}"
|
||||
src: "/usr/local/src/prometheus-2.45.0.linux-amd64/{{ item }}"
|
||||
src: >-
|
||||
/usr/local/src/prometheus-{{ prometheus_version }}.linux-amd64/{{ item }}
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
remote_src: true
|
||||
notify: Restart prometheus
|
||||
with_items:
|
||||
- promtool
|
||||
- prometheus
|
||||
|
@ -109,7 +116,7 @@
|
|||
location / {
|
||||
proxy_pass http://127.0.0.1:9090;
|
||||
}
|
||||
mode: 0644
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: "{{ ansible_wheel }}"
|
||||
notify: Restart nginx
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue