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
|
- name: Extract package
|
||||||
ansible.builtin.unarchive:
|
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
|
dest: /usr/local/src
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
|
@ -25,11 +30,13 @@
|
||||||
- name: Copy binaries
|
- name: Copy binaries
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
dest: "/usr/local/sbin/{{ item }}"
|
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"
|
mode: "0755"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
remote_src: true
|
remote_src: true
|
||||||
|
notify: Restart prometheus
|
||||||
with_items:
|
with_items:
|
||||||
- promtool
|
- promtool
|
||||||
- prometheus
|
- prometheus
|
||||||
|
@ -109,7 +116,7 @@
|
||||||
location / {
|
location / {
|
||||||
proxy_pass http://127.0.0.1:9090;
|
proxy_pass http://127.0.0.1:9090;
|
||||||
}
|
}
|
||||||
mode: 0644
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: "{{ ansible_wheel }}"
|
group: "{{ ansible_wheel }}"
|
||||||
notify: Restart nginx
|
notify: Restart nginx
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue