pull good file

This commit is contained in:
jean-yves.fournier 2022-01-05 16:08:37 +01:00
parent 024b001bea
commit bfcb16f81a

View File

@ -1,44 +1,44 @@
--- ---
- name: 'prometheus | php-opcache exporter | get latest release from GitHub' - name: 'prometheus | opcache exporter | get latest release from GitHub'
shell: curl --silent "https://api.github.com/repos/MyOnlineStore/opcache-exporter/releases/latest" | jq -r .tag_name | sed "s/v//" shell: curl --silent "https://api.github.com/repos/MyOnlineStore/opcache-exporter/releases/latest" | jq -r .tag_name | sed "s/v//"
args: args:
warn: false warn: false
register: prometheus_php-opcache_exporter_latest_version register: prometheus_opcache_exporter_latest_version
run_once: true run_once: true
- name: 'prometheus | php-opcache exporter | download' - name: 'prometheus | opcache exporter | download'
get_url: get_url:
url: https://github.com/MyOnlineStore/opcache-exporter/releases/download/v{{ prometheus_php-opcache_exporter_version|default(prometheus_php-opcache_exporter_latest_version.stdout) }}/opcache_exporter-{{ prometheus_php-opcache_exporter_version|default(prometheus_php-opcache_exporter_latest_version.stdout) }}-linux-amd64 url: https://github.com/MyOnlineStore/opcache-exporter/releases/download/v{{ prometheus_opcache_exporter_version|default(prometheus_opcache_exporter_latest_version.stdout) }}/opcache_exporter-{{ prometheus_opcache_exporter_version|default(prometheus_opcache_exporter_latest_version.stdout) }}-linux-amd64
dest: /tmp dest: /tmp
- name: 'prometheus | php-opcache exporter | move to /usr/local/bin' - name: 'prometheus | opcache exporter | move to /usr/local/bin'
copy: copy:
src: /tmp/opcache_exporter-{{ prometheus_php-opcache_exporter_version|default(prometheus_php-opcache_exporter_latest_version.stdout) }}-linux-amd64 src: /tmp/opcache_exporter-{{ prometheus_opcache_exporter_version|default(prometheus_opcache_exporter_latest_version.stdout) }}-linux-amd64
dest: /usr/local/bin/prometheus-php-opcache-exporter dest: /usr/local/bin/prometheus-opcache-exporter
remote_src: yes remote_src: yes
owner: root owner: root
group: root group: root
mode: 0755 mode: 0755
- name: 'prometheus | php-opcache exporter | configuration' - name: 'prometheus | opcache exporter | configuration'
template: template:
src: conf/prometheus-php-opcache-exporter.j2 src: conf/prometheus-opcache-exporter.j2
dest: /etc/default/prometheus-php-opcache-exporter dest: /etc/default/prometheus-opcache-exporter
owner: root owner: root
group: root group: root
mode: 0600 mode: 0600
register: prometheus_php-opcache_exporter_configuration register: prometheus_opcache_exporter_configuration
- name: 'prometheus | php-opcache exporter | install unit file to systemd' - name: 'prometheus | opcache exporter | install unit file to systemd'
template: template:
src: systemd/prometheus-php-opcache-exporter.service.j2 src: systemd/prometheus-opcache-exporter.service.j2
dest: /etc/systemd/system/prometheus-php-opcache-exporter.service dest: /etc/systemd/system/prometheus-opcache-exporter.service
owner: root owner: root
group: root group: root
mode: 0600 mode: 0600
- name: 'prometheus | php-opcache exporter | configure systemd to use service' - name: 'prometheus | opcache exporter | configure systemd to use service'
systemd: systemd:
daemon_reload: yes daemon_reload: yes
enabled: yes enabled: yes
name: prometheus-php-opcache-exporter.service name: prometheus-opcache-exporter.service