mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-12-22 08:17:33 +01:00
Fix package architecture
This commit is contained in:
parent
8310af201b
commit
1340787ce3
2 changed files with 15 additions and 8 deletions
|
@ -3,28 +3,31 @@
|
|||
|
||||
- name: check if package files already exist
|
||||
stat:
|
||||
path: "/root/{{ item.name }}_{{ item.version }}_amd64.deb"
|
||||
path: "/root/{{ item.name }}_{{ item.version }}_{{ item.arch }}.deb"
|
||||
loop:
|
||||
- name: prometheus-node-exporter
|
||||
version: 1.0.1+ds-1
|
||||
arch: amd64
|
||||
- name: prometheus-node-exporter-collectors
|
||||
version: 0+git20201003.8db38d1
|
||||
arch: all
|
||||
register: prometheus_node_register_ucs_deb_stat
|
||||
|
||||
- name: download packages
|
||||
get_url:
|
||||
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_amd64.deb" # noqa 204
|
||||
dest: "/root/{{ package }}_{{ version }}_amd64.deb"
|
||||
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_{{ arch | urlencode() }}.deb" # noqa 204
|
||||
dest: "/root/{{ package }}_{{ version }}_{{ arch }}.deb"
|
||||
vars:
|
||||
pfirst: "{{ item.item.name[:1] }}"
|
||||
package: "{{ item.item.name }}"
|
||||
version: "{{ item.item.version }}"
|
||||
arch: "{{ item.item.arch }}"
|
||||
when: not item.stat.exists
|
||||
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||
|
||||
- name: install packages
|
||||
apt:
|
||||
deb: "/root/{{ item.item.name }}_{{ item.item.version }}_amd64.deb"
|
||||
deb: "/root/{{ item.item.name }}_{{ item.item.version }}_{{ item.item.arch }}.deb"
|
||||
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||
|
||||
- name: start prometheus-node-exporter.service
|
||||
|
|
|
@ -2,30 +2,34 @@
|
|||
|
||||
- name: check if package files already exist
|
||||
stat:
|
||||
path: "/root/{{ item.name }}_{{ item.version }}_amd64.deb"
|
||||
path: "/root/{{ item.name }}_{{ item.version }}_{{ item.arch }}.deb"
|
||||
loop:
|
||||
- name: prometheus-node-exporter
|
||||
version: 1.0.1+ds-1
|
||||
arch: amd64
|
||||
- name: prometheus-node-exporter-collectors
|
||||
version: 0+git20201003.8db38d1
|
||||
arch: all
|
||||
- name: moreutils
|
||||
version: 0.64-1
|
||||
arch: amd64
|
||||
register: prometheus_node_register_ucs_deb_stat
|
||||
|
||||
- name: download packages
|
||||
get_url:
|
||||
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_amd64.deb" # noqa 204
|
||||
dest: "/root/{{ package }}_{{ version }}_amd64.deb"
|
||||
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_{{ arch | urlencode() }}.deb" # noqa 204
|
||||
dest: "/root/{{ package }}_{{ version }}_{{ arch }}.deb"
|
||||
vars:
|
||||
pfirst: "{{ item.item.name[:1] }}"
|
||||
package: "{{ item.item.name }}"
|
||||
version: "{{ item.item.version }}"
|
||||
arch: "{{ item.item.arch }}"
|
||||
when: not item.stat.exists
|
||||
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||
|
||||
- name: install packages
|
||||
apt:
|
||||
deb: "/root/{{ item.item.name }}_{{ item.item.version }}_amd64.deb"
|
||||
deb: "/root/{{ item.item.name }}_{{ item.item.version }}_{{ item.item.arch }}.deb"
|
||||
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||
|
||||
- name: start prometheus-node-exporter.service
|
||||
|
|
Loading…
Reference in a new issue