cleanup, add version support
This commit is contained in:
@@ -8,12 +8,31 @@
|
||||
- name: Unarchive prometheus binary
|
||||
unarchive:
|
||||
src: "{{ download_result.dest }}"
|
||||
dest: /usr/local/bin/
|
||||
dest: /tmp
|
||||
remote_src: true # Indicates the source file is on the remote host
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0755
|
||||
|
||||
- name: Copy prometheus binary to /usr/local/bin
|
||||
copy:
|
||||
src: "/tmp/prometheus-{{ prometheus_version }}.linux-amd64/prometheus"
|
||||
dest: "/usr/local/bin/prometheus-{{ prometheus_version }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755'
|
||||
remote_src: yes
|
||||
|
||||
- name: Create prometheus binary symlink
|
||||
file:
|
||||
src: "/usr/local/bin/prometheus-{{ prometheus_version }}"
|
||||
dest: "/usr/local/bin/prometheus"
|
||||
state: link
|
||||
owner: root
|
||||
group: root
|
||||
mode: '0755' # Permissions for the target file
|
||||
force: yes
|
||||
|
||||
- name: Create a prometheus group
|
||||
group:
|
||||
name: prometheus
|
||||
|
||||
Reference in New Issue
Block a user