Setting one archive_path per role and setting default values

Signed-off-by: Mark Tomich <tomichms@nih.gov>
This commit is contained in:
Mark Tomich 2024-02-29 10:55:40 -05:00
parent 5150409d55
commit 32d15d4361
37 changed files with 147 additions and 93 deletions

View file

@ -134,3 +134,6 @@ alertmanager_amtool_config_alertmanager_url: "{{ alertmanager_web_external_url }
# Extended output of `amtool` commands, use '' for less verbosity
alertmanager_amtool_config_output: 'extended'
# Local path to stash the archive and its extraction
alertmanager_archive_path: /tmp

View file

@ -36,7 +36,7 @@
become: false
ansible.builtin.get_url:
url: "{{ alertmanager_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ alertmanager_archive_path }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __alertmanager_checksum }}"
mode: 0644
register: _download_archive
@ -50,16 +50,16 @@
- name: Unpack alertmanager binaries
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
src: "{{ alertmanager_archive_path }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ alertmanager_archive_path }}"
mode: 0755
creates: "{{ prometheus_archive_path | default('/tmp') }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}/alertmanager"
creates: "{{ alertmanager_archive_path }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}/alertmanager"
delegate_to: localhost
check_mode: false
- name: Propagate official alertmanager and amtool binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}/{{ item }}"
src: "{{ alertmanager_archive_path }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}/{{ item }}"
dest: "{{ _alertmanager_binary_install_dir }}/{{ item }}"
mode: 0755
owner: root

View file

@ -75,3 +75,6 @@ blackbox_exporter_configuration_modules:
blackbox_exporter_config_dir: /etc/blackbox_exporter
blackbox_exporter_binary_install_dir: "/usr/local/bin"
# Local path to stash the archive and its extraction
blackbox_exporter_archive_path: /tmp

View file

@ -25,7 +25,7 @@
become: false
ansible.builtin.get_url:
url: "{{ blackbox_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ blackbox_exporter_archive_path }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __blackbox_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -38,15 +38,15 @@
- name: Unpack blackbox_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}/blackbox_exporter"
src: "{{ blackbox_exporter_archive_path }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ blackbox_exporter_archive_path }}"
creates: "{{ blackbox_exporter_archive_path }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}/blackbox_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate blackbox_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}/blackbox_exporter"
src: "{{ blackbox_exporter_archive_path }}/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}/blackbox_exporter"
dest: "{{ blackbox_exporter_binary_install_dir }}/blackbox_exporter"
mode: 0755
owner: root

View file

@ -12,3 +12,6 @@ cadvisor_prometheus_endpoint: "/metrics"
cadvisor_binary_install_dir: "/usr/local/bin"
cadvisor_system_group: "root"
cadvisor_system_user: "{{ cadvisor_system_group }}"
# Local path to stash the archive and its extraction
cadvisor_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ cadvisor_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/cadvisor-v{{ cadvisor_version }}-linux-{{ go_arch }}"
dest: "{{ cadvisor_archive_path }}/cadvisor-v{{ cadvisor_version }}-linux-{{ go_arch }}"
mode: '0644'
register: _download_binary
until: _download_binary is succeeded
@ -38,7 +38,7 @@
- name: Propagate cadvisor binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/cadvisor-v{{ cadvisor_version }}-linux-{{ go_arch }}"
src: "{{ cadvisor_archive_path }}/cadvisor-v{{ cadvisor_version }}-linux-{{ go_arch }}"
dest: "{{ cadvisor_binary_install_dir }}/cadvisor"
mode: 0755
owner: root

View file

@ -24,3 +24,6 @@ chrony_exporter_disabled_collectors: []
chrony_exporter_binary_install_dir: "/usr/local/bin"
chrony_exporter_system_group: "chrony-exp"
chrony_exporter_system_user: "{{ chrony_exporter_system_group }}"
# Local path to stash the archive and its extraction
chrony_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ chrony_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ chrony_exporter_archive_path }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __chrony_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack chrony_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}/chrony_exporter"
src: "{{ chrony_exporter_archive_path }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ chrony_exporter_archive_path }}"
creates: "{{ chrony_exporter_archive_path }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}/chrony_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate chrony_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}/chrony_exporter"
src: "{{ chrony_exporter_archive_path }}/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}/chrony_exporter"
dest: "{{ chrony_exporter_binary_install_dir }}/chrony_exporter"
mode: 0755
owner: root

View file

@ -13,3 +13,6 @@ fail2ban_exporter_binary_install_dir: "/usr/local/bin"
fail2ban_exporter_username: ""
fail2ban_exporter_password: ""
# Local path to stash the archive and its extraction
fail2ban_exporter_archive_path: /tmp

View file

@ -9,7 +9,7 @@
become: false
ansible.builtin.get_url:
url: "{{ fail2ban_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/fail2ban_exporter_{{ fail2ban_exporter_version }}_linux_{{ go_arch }}.tar.gz"
dest: "{{ fail2ban_exporter_archive_path }}/fail2ban_exporter_{{ fail2ban_exporter_version }}_linux_{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __fail2ban_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -22,15 +22,15 @@
- name: Unpack fail2ban_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/fail2ban_exporter_{{ fail2ban_exporter_version }}_linux_{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/fail2ban_exporter"
src: "{{ fail2ban_exporter_archive_path }}/fail2ban_exporter_{{ fail2ban_exporter_version }}_linux_{{ go_arch }}.tar.gz"
dest: "{{ fail2ban_exporter_archive_path }}"
creates: "{{ fail2ban_exporter_archive_path }}/fail2ban_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate fail2ban_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/fail2ban_exporter"
src: "{{ fail2ban_exporter_archive_path }}/fail2ban_exporter"
dest: "{{ fail2ban_exporter_binary_install_dir }}/fail2ban_exporter"
mode: 0755
owner: root

View file

@ -29,3 +29,6 @@ ipmi_exporter_log_format: "logfmt"
ipmi_exporter_binary_install_dir: "/usr/local/bin"
ipmi_exporter_system_group: "ipmi-exp"
ipmi_exporter_system_user: "{{ ipmi_exporter_system_group }}"
# Local path to stash the archive and its extraction
ipmi_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ ipmi_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ ipmi_exporter_archive_path }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __ipmi_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack ipmi_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}/ipmi_exporter"
src: "{{ ipmi_exporter_archive_path }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ ipmi_exporter_archive_path }}"
creates: "{{ ipmi_exporter_archive_path }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}/ipmi_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate ipmi_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}/ipmi_exporter"
src: "{{ ipmi_exporter_archive_path }}/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}/ipmi_exporter"
dest: "{{ ipmi_exporter_binary_install_dir }}/ipmi_exporter"
mode: 0755
owner: root

View file

@ -23,3 +23,6 @@ memcached_exporter_log_format: "logfmt"
memcached_exporter_binary_install_dir: "/usr/local/bin"
memcached_exporter_system_group: "memcached-exp"
memcached_exporter_system_user: "{{ memcached_exporter_system_group }}"
# Local path to stash the archive and its extraction
memcached_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ memcached_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ memcached_exporter_archive_path }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __memcached_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack memcached_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}/memcached_exporter"
src: "{{ memcached_exporter_archive_path }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ memcached_exporter_archive_path }}"
creates: "{{ memcached_exporter_archive_path }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}/memcached_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate memcached_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}/memcached_exporter"
src: "{{ memcached_exporter_archive_path }}/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}/memcached_exporter"
dest: "{{ memcached_exporter_binary_install_dir }}/memcached_exporter"
mode: 0755
owner: root

View file

@ -34,3 +34,6 @@ mongodb_exporter_binary_install_dir: "/usr/local/bin"
mongodb_exporter_system_group: "{{ mongodb_exporter_system_user }}"
mongodb_exporter_system_user: "mongodb-exp"
mongodb_exporter_config_dir: "/etc/mongodb_exporter"
# Local path to stash the archive and its extraction
mongodb_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ mongodb_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ mongodb_exporter_archive_path }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __mongodb_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack mongodb_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}/mongodb_exporter"
src: "{{ mongodb_exporter_archive_path }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ mongodb_exporter_archive_path }}"
creates: "{{ mongodb_exporter_archive_path }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}/mongodb_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate mongodb_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}/mongodb_exporter"
src: "{{ mongodb_exporter_archive_path }}/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}/mongodb_exporter"
dest: "{{ mongodb_exporter_binary_install_dir }}/mongodb_exporter"
mode: 0755
owner: root

View file

@ -34,3 +34,6 @@ mysqld_exporter_binary_install_dir: "/usr/local/bin"
mysqld_exporter_config_dir: "/etc/mysqld_exporter"
mysqld_exporter_system_group: "mysqld-exp"
mysqld_exporter_system_user: "{{ mysqld_exporter_system_group }}"
# Local path to stash the archive and its extraction
mysqld_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ mysqld_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ mysqld_exporter_archive_path }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __mysqld_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,9 +40,9 @@
- name: Unpack mysqld_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}/mysqld_exporter"
src: "{{ mysqld_exporter_archive_path }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ mysqld_exporter_archive_path }}"
creates: "{{ mysqld_exporter_archive_path }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}/mysqld_exporter"
extra_opts:
- --no-same-owner
delegate_to: localhost
@ -50,7 +50,7 @@
- name: Propagate mysqld_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}/mysqld_exporter"
src: "{{ mysqld_exporter_archive_path }}/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}/mysqld_exporter"
dest: "{{ mysqld_exporter_binary_install_dir }}/mysqld_exporter"
mode: '0755'
owner: root

View file

@ -23,3 +23,6 @@ nginx_exporter_log_format: "logfmt"
nginx_exporter_binary_install_dir: "/usr/local/bin"
nginx_exporter_system_group: "nginx-exp"
nginx_exporter_system_user: "{{ nginx_exporter_system_group }}"
# Local path to stash the archive and its extraction
nginx_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ nginx_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_linux_{{ go_arch }}.tar.gz"
dest: "{{ nginx_exporter_archive_path }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_linux_{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __nginx_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack nginx_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_linux_{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/nginx-prometheus-exporter"
src: "{{ nginx_exporter_archive_path }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_linux_{{ go_arch }}.tar.gz"
dest: "{{ nginx_exporter_archive_path }}"
creates: "{{ nginx_exporter_archive_path }}/nginx-prometheus-exporter"
delegate_to: localhost
check_mode: false
- name: Propagate nginx_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/nginx-prometheus-exporter"
src: "{{ nginx_exporter_archive_path }}/nginx-prometheus-exporter"
dest: "{{ nginx_exporter_binary_install_dir }}/nginx-prometheus-exporter"
mode: 0755
owner: root

View file

@ -30,3 +30,6 @@ node_exporter_disabled_collectors: []
node_exporter_binary_install_dir: "/usr/local/bin"
node_exporter_system_group: "node-exp"
node_exporter_system_user: "{{ node_exporter_system_group }}"
# Local path to stash the archive and its extraction
node_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ node_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ node_exporter_archive_path }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __node_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack node_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter"
src: "{{ node_exporter_archive_path }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ node_exporter_archive_path }}"
creates: "{{ node_exporter_archive_path }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate node_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter"
src: "{{ node_exporter_archive_path }}/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}/node_exporter"
dest: "{{ node_exporter_binary_install_dir }}/node_exporter"
mode: 0755
owner: root

View file

@ -31,3 +31,6 @@ postgres_exporter_binary_install_dir: "/usr/local/bin"
postgres_exporter_config_dir: "/etc/postgres_exporter"
postgres_exporter_system_group: "postgres-exp"
postgres_exporter_system_user: "{{ postgres_exporter_system_group }}"
# Local path to stash the archive and its extraction
postgres_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ postgres_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ postgres_exporter_archive_path }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __postgres_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,9 +40,9 @@
- name: Unpack postgres_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}/postgres_exporter"
src: "{{ postgres_exporter_archive_path }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ postgres_exporter_archive_path }}"
creates: "{{ postgres_exporter_archive_path }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}/postgres_exporter"
extra_opts:
- --no-same-owner
delegate_to: localhost
@ -50,7 +50,7 @@
- name: Propagate postgres_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}/postgres_exporter"
src: "{{ postgres_exporter_archive_path }}/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}/postgres_exporter"
dest: "{{ postgres_exporter_binary_install_dir }}/postgres_exporter"
mode: '0755'
owner: root

View file

@ -228,3 +228,6 @@ prometheus_alert_rules: # noqa yaml[line-length] # noqa line-length
# yamllint enable rule:line-length
prometheus_stop_timeout: '600s'
# Local path to stash the archive and its extraction
prometheus_archive_path: /tmp

View file

@ -44,7 +44,7 @@
become: false
ansible.builtin.get_url:
url: "{{ prometheus_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __prometheus_checksum }}"
mode: 0644
register: _download_archive
@ -58,15 +58,15 @@
- name: Unpack prometheus binaries
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/prometheus"
src: "{{ prometheus_archive_path }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path }}"
creates: "{{ prometheus_archive_path }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/prometheus"
delegate_to: localhost
check_mode: false
- name: Propagate official prometheus and promtool binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/{{ item }}"
src: "{{ prometheus_archive_path }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/{{ item }}"
dest: "{{ _prometheus_binary_install_dir }}/{{ item }}"
mode: 0755
owner: root
@ -79,7 +79,7 @@
- name: Propagate official console templates
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/{{ item }}/"
src: "{{ prometheus_archive_path }}/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}/{{ item }}/"
dest: "{{ prometheus_config_dir }}/{{ item }}/"
mode: 0644
owner: root

View file

@ -18,3 +18,6 @@ pushgateway_basic_auth_users: {}
pushgateway_binary_install_dir: "/usr/local/bin"
pushgateway_system_group: "pushgateway"
pushgateway_system_user: "{{ pushgateway_system_group }}"
# Local path to stash the archive and its extraction
pushgateway_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ pushgateway_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ pushgateway_archive_path }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __pushgateway_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack pushgateway binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}/pushgateway"
src: "{{ pushgateway_archive_path }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ pushgateway_archive_path }}"
creates: "{{ pushgateway_archive_path }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}/pushgateway"
delegate_to: localhost
check_mode: false
- name: Propagate pushgateway binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}/pushgateway"
src: "{{ pushgateway_archive_path }}/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}/pushgateway"
dest: "{{ pushgateway_binary_install_dir }}/pushgateway"
mode: 0755
owner: root

View file

@ -49,3 +49,6 @@ redis_exporter_config_command: "CONFIG"
redis_exporter_binary_install_dir: "/usr/local/bin"
redis_exporter_system_group: "redis-exp"
redis_exporter_system_user: "{{ redis_exporter_system_group }}"
# Local path to stash the archive and its extraction
redis_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ redis_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/redis_exporter-{{ redis_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ redis_exporter_archive_path }}/redis_exporter-{{ redis_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __redis_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack redis_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/redis_exporter-{{ redis_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/redis_exporter-{{ redis_exporter_version }}.linux-{{ go_arch }}/redis_exporter"
src: "{{ redis_exporter_archive_path }}/redis_exporter-{{ redis_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ redis_exporter_archive_path }}"
creates: "{{ redis_exporter_archive_path }}/redis_exporter-{{ redis_exporter_version }}.linux-{{ go_arch }}/redis_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate redis_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/redis_exporter-v{{ redis_exporter_version }}.linux-{{ go_arch }}/redis_exporter"
src: "{{ redis_exporter_archive_path }}/redis_exporter-v{{ redis_exporter_version }}.linux-{{ go_arch }}/redis_exporter"
dest: "{{ redis_exporter_binary_install_dir }}/redis_exporter"
mode: 0755
owner: root

View file

@ -28,3 +28,6 @@ smartctl_exporter_log_format: "logfmt"
smartctl_exporter_binary_install_dir: "/usr/local/bin"
smartctl_exporter_system_group: "smartctl-exp"
smartctl_exporter_system_user: "{{ smartctl_exporter_system_group }}"
# Local path to stash the archive and its extraction
smartctl_exporter_archive_path: /tmp

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ smartctl_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ smartctl_exporter_archive_path }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __smartctl_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack smartctl_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}/smartctl_exporter"
src: "{{ smartctl_exporter_archive_path }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ smartctl_exporter_archive_path }}"
creates: "{{ smartctl_exporter_archive_path }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}/smartctl_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate smartctl_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}/smartctl_exporter"
src: "{{ smartctl_exporter_archive_path }}/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}/smartctl_exporter"
dest: "{{ smartctl_exporter_binary_install_dir }}/smartctl_exporter"
mode: 0755
owner: root

View file

@ -27,7 +27,7 @@
become: false
ansible.builtin.get_url:
url: "{{ smokeping_prober_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ smokeping_archive_path }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __smokeping_prober_checksum }}"
mode: '0644'
register: _download_binary
@ -40,15 +40,15 @@
- name: Unpack smokeping_prober binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}/smokeping_prober"
src: "{{ smokeping_archive_path }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ smokeping_archive_path }}"
creates: "{{ smokeping_archive_path }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}/smokeping_prober"
delegate_to: localhost
check_mode: false
- name: Propagate smokeping_prober binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}/smokeping_prober"
src: "{{ smokeping_archive_path }}/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}/smokeping_prober"
dest: "{{ smokeping_prober_binary_install_dir }}/smokeping_prober"
mode: 0755
owner: root

View file

@ -12,3 +12,6 @@ snmp_exporter_log_level: info
snmp_exporter_config_file: ""
snmp_exporter_binary_install_dir: "/usr/local/bin"
# Local path to stash the archive and its extraction
snmp_exporter_archive_path: /tmp

View file

@ -9,7 +9,7 @@
become: false
ansible.builtin.get_url:
url: "{{ snmp_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ snmp_exporter_archive_path }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ __snmp_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -22,15 +22,15 @@
- name: Unpack snmp_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}/snmp_exporter"
src: "{{ snmp_exporter_archive_path }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ snmp_exporter_archive_path }}"
creates: "{{ snmp_exporter_archive_path }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}/snmp_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate snmp_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}/snmp_exporter"
src: "{{ snmp_exporter_archive_path }}/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}/snmp_exporter"
dest: "{{ snmp_exporter_binary_install_dir }}/snmp_exporter"
mode: 0755
owner: root

View file

@ -21,3 +21,6 @@ systemd_exporter_system_group: "systemd-exporter"
systemd_exporter_system_user: "{{ systemd_exporter_system_group }}"
systemd_exporter_log_level: info
# Local path to stash the archive and its extraction
systemd_exporter_archive_path: /tmp

View file

@ -26,7 +26,7 @@
become: false
ansible.builtin.get_url:
url: "{{ systemd_exporter_binary_url }}"
dest: "{{ prometheus_archive_path | default('/tmp') }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ systemd_exporter_archive_path }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz"
checksum: "sha256:{{ _systemd_exporter_checksum }}"
mode: '0644'
register: _download_binary
@ -39,15 +39,15 @@
- name: Unpack systemd_exporter binary
become: false
ansible.builtin.unarchive:
src: "{{ prometheus_archive_path | default('/tmp') }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ prometheus_archive_path | default('/tmp') }}"
creates: "{{ prometheus_archive_path | default('/tmp') }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}/systemd_exporter"
src: "{{ systemd_exporter_archive_path }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz"
dest: "{{ systemd_exporter_archive_path }}"
creates: "{{ systemd_exporter_archive_path }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}/systemd_exporter"
delegate_to: localhost
check_mode: false
- name: Propagate systemd_exporter binaries
ansible.builtin.copy:
src: "{{ prometheus_archive_path | default('/tmp') }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}/systemd_exporter"
src: "{{ systemd_exporter_archive_path }}/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}/systemd_exporter"
dest: "{{ systemd_exporter_binary_install_dir }}/systemd_exporter"
mode: 0755
owner: root