mirror of
https://gitlab.com/s3lph/ansible-collection-prometheus
synced 2024-11-22 09:41:01 +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
|
- name: check if package files already exist
|
||||||
stat:
|
stat:
|
||||||
path: "/root/{{ item.name }}_{{ item.version }}_amd64.deb"
|
path: "/root/{{ item.name }}_{{ item.version }}_{{ item.arch }}.deb"
|
||||||
loop:
|
loop:
|
||||||
- name: prometheus-node-exporter
|
- name: prometheus-node-exporter
|
||||||
version: 1.0.1+ds-1
|
version: 1.0.1+ds-1
|
||||||
|
arch: amd64
|
||||||
- name: prometheus-node-exporter-collectors
|
- name: prometheus-node-exporter-collectors
|
||||||
version: 0+git20201003.8db38d1
|
version: 0+git20201003.8db38d1
|
||||||
|
arch: all
|
||||||
register: prometheus_node_register_ucs_deb_stat
|
register: prometheus_node_register_ucs_deb_stat
|
||||||
|
|
||||||
- name: download packages
|
- name: download packages
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_amd64.deb" # noqa 204
|
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_{{ arch | urlencode() }}.deb" # noqa 204
|
||||||
dest: "/root/{{ package }}_{{ version }}_amd64.deb"
|
dest: "/root/{{ package }}_{{ version }}_{{ arch }}.deb"
|
||||||
vars:
|
vars:
|
||||||
pfirst: "{{ item.item.name[:1] }}"
|
pfirst: "{{ item.item.name[:1] }}"
|
||||||
package: "{{ item.item.name }}"
|
package: "{{ item.item.name }}"
|
||||||
version: "{{ item.item.version }}"
|
version: "{{ item.item.version }}"
|
||||||
|
arch: "{{ item.item.arch }}"
|
||||||
when: not item.stat.exists
|
when: not item.stat.exists
|
||||||
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||||
|
|
||||||
- name: install packages
|
- name: install packages
|
||||||
apt:
|
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 }}"
|
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||||
|
|
||||||
- name: start prometheus-node-exporter.service
|
- name: start prometheus-node-exporter.service
|
||||||
|
|
|
@ -2,30 +2,34 @@
|
||||||
|
|
||||||
- name: check if package files already exist
|
- name: check if package files already exist
|
||||||
stat:
|
stat:
|
||||||
path: "/root/{{ item.name }}_{{ item.version }}_amd64.deb"
|
path: "/root/{{ item.name }}_{{ item.version }}_{{ item.arch }}.deb"
|
||||||
loop:
|
loop:
|
||||||
- name: prometheus-node-exporter
|
- name: prometheus-node-exporter
|
||||||
version: 1.0.1+ds-1
|
version: 1.0.1+ds-1
|
||||||
|
arch: amd64
|
||||||
- name: prometheus-node-exporter-collectors
|
- name: prometheus-node-exporter-collectors
|
||||||
version: 0+git20201003.8db38d1
|
version: 0+git20201003.8db38d1
|
||||||
|
arch: all
|
||||||
- name: moreutils
|
- name: moreutils
|
||||||
version: 0.64-1
|
version: 0.64-1
|
||||||
|
arch: amd64
|
||||||
register: prometheus_node_register_ucs_deb_stat
|
register: prometheus_node_register_ucs_deb_stat
|
||||||
|
|
||||||
- name: download packages
|
- name: download packages
|
||||||
get_url:
|
get_url:
|
||||||
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_amd64.deb" # noqa 204
|
url: "https://{{ debian_mirror }}/debian/pool/main/{{ pfirst | urlencode() }}/{{ package | urlencode() }}/{{ package | urlencode() }}_{{ version | urlencode() }}_{{ arch | urlencode() }}.deb" # noqa 204
|
||||||
dest: "/root/{{ package }}_{{ version }}_amd64.deb"
|
dest: "/root/{{ package }}_{{ version }}_{{ arch }}.deb"
|
||||||
vars:
|
vars:
|
||||||
pfirst: "{{ item.item.name[:1] }}"
|
pfirst: "{{ item.item.name[:1] }}"
|
||||||
package: "{{ item.item.name }}"
|
package: "{{ item.item.name }}"
|
||||||
version: "{{ item.item.version }}"
|
version: "{{ item.item.version }}"
|
||||||
|
arch: "{{ item.item.arch }}"
|
||||||
when: not item.stat.exists
|
when: not item.stat.exists
|
||||||
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||||
|
|
||||||
- name: install packages
|
- name: install packages
|
||||||
apt:
|
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 }}"
|
loop: "{{ prometheus_node_register_ucs_deb_stat.results }}"
|
||||||
|
|
||||||
- name: start prometheus-node-exporter.service
|
- name: start prometheus-node-exporter.service
|
||||||
|
|
Loading…
Reference in a new issue