diff --git a/roles/alertmanager/defaults/main.yml b/roles/alertmanager/defaults/main.yml index 0dcc8e235..c8e82be1e 100644 --- a/roles/alertmanager/defaults/main.yml +++ b/roles/alertmanager/defaults/main.yml @@ -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 diff --git a/roles/alertmanager/meta/argument_specs.yml b/roles/alertmanager/meta/argument_specs.yml index 6baf19e1f..a16b2e224 100644 --- a/roles/alertmanager/meta/argument_specs.yml +++ b/roles/alertmanager/meta/argument_specs.yml @@ -110,3 +110,6 @@ argument_specs: alertmanager_amtool_config_output: description: 'Extended output, use C("") for simple output.' default: "extended" + alertmanager_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/alertmanager/tasks/install.yml b/roles/alertmanager/tasks/install.yml index fda80abf8..7f9b47d03 100644 --- a/roles/alertmanager/tasks/install.yml +++ b/roles/alertmanager/tasks/install.yml @@ -36,7 +36,7 @@ become: false ansible.builtin.get_url: url: "{{ alertmanager_binary_url }}" - dest: "/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: "/tmp/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" + src: "{{ alertmanager_archive_path }}/alertmanager-{{ alertmanager_version }}.linux-{{ go_arch }}.tar.gz" + dest: "{{ alertmanager_archive_path }}" mode: 0755 - creates: "/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: "/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 diff --git a/roles/blackbox_exporter/defaults/main.yml b/roles/blackbox_exporter/defaults/main.yml index 8ffa4440c..75ccf88f3 100644 --- a/roles/blackbox_exporter/defaults/main.yml +++ b/roles/blackbox_exporter/defaults/main.yml @@ -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 diff --git a/roles/blackbox_exporter/meta/argument_specs.yml b/roles/blackbox_exporter/meta/argument_specs.yml index 2938f698d..71af0be1f 100644 --- a/roles/blackbox_exporter/meta/argument_specs.yml +++ b/roles/blackbox_exporter/meta/argument_specs.yml @@ -56,3 +56,6 @@ argument_specs: blackbox_exporter_group: description: "The group the exporter runs as" default: "blackbox-exp" + blackbox_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/blackbox_exporter/tasks/install.yml b/roles/blackbox_exporter/tasks/install.yml index 6470b465d..19c79f9a9 100644 --- a/roles/blackbox_exporter/tasks/install.yml +++ b/roles/blackbox_exporter/tasks/install.yml @@ -25,7 +25,7 @@ become: false ansible.builtin.get_url: url: "{{ blackbox_exporter_binary_url }}" - dest: "/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: "/tmp/blackbox_exporter-{{ blackbox_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/cadvisor/defaults/main.yml b/roles/cadvisor/defaults/main.yml index bd9e41567..0f28ce459 100644 --- a/roles/cadvisor/defaults/main.yml +++ b/roles/cadvisor/defaults/main.yml @@ -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 diff --git a/roles/cadvisor/meta/argument_specs.yml b/roles/cadvisor/meta/argument_specs.yml index 5346775e9..638a22f84 100644 --- a/roles/cadvisor/meta/argument_specs.yml +++ b/roles/cadvisor/meta/argument_specs.yml @@ -47,3 +47,6 @@ argument_specs: - "I(Advanced)" - "cAdvisor user" default: "root" + cadvisor_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/cadvisor/tasks/install.yml b/roles/cadvisor/tasks/install.yml index 9c108f04f..9cebe72be 100644 --- a/roles/cadvisor/tasks/install.yml +++ b/roles/cadvisor/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ cadvisor_binary_url }}" - dest: "/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: "/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 diff --git a/roles/chrony_exporter/defaults/main.yml b/roles/chrony_exporter/defaults/main.yml index d6e338d9f..dbf996223 100644 --- a/roles/chrony_exporter/defaults/main.yml +++ b/roles/chrony_exporter/defaults/main.yml @@ -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 diff --git a/roles/chrony_exporter/meta/argument_specs.yml b/roles/chrony_exporter/meta/argument_specs.yml index 1ee086112..60defd6c1 100644 --- a/roles/chrony_exporter/meta/argument_specs.yml +++ b/roles/chrony_exporter/meta/argument_specs.yml @@ -73,3 +73,6 @@ argument_specs: - "I(Advanced)" - "Chrony exporter user" default: "chrony-exp" + chrony_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/chrony_exporter/tasks/install.yml b/roles/chrony_exporter/tasks/install.yml index 0a9fd5a6b..347def862 100644 --- a/roles/chrony_exporter/tasks/install.yml +++ b/roles/chrony_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ chrony_exporter_binary_url }}" - dest: "/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: "/tmp/chrony_exporter-{{ chrony_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/fail2ban_exporter/defaults/main.yml b/roles/fail2ban_exporter/defaults/main.yml index fbc7b7273..2126d0972 100644 --- a/roles/fail2ban_exporter/defaults/main.yml +++ b/roles/fail2ban_exporter/defaults/main.yml @@ -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 diff --git a/roles/fail2ban_exporter/meta/argument_specs.yml b/roles/fail2ban_exporter/meta/argument_specs.yml index 533a7e7a0..6f70e2f4f 100644 --- a/roles/fail2ban_exporter/meta/argument_specs.yml +++ b/roles/fail2ban_exporter/meta/argument_specs.yml @@ -46,3 +46,6 @@ argument_specs: description: - "I(Advanced)" - "Password to use to protect endpoints with basic auth" + fail2ban_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/fail2ban_exporter/tasks/install.yml b/roles/fail2ban_exporter/tasks/install.yml index 846556e32..0c7f6802d 100644 --- a/roles/fail2ban_exporter/tasks/install.yml +++ b/roles/fail2ban_exporter/tasks/install.yml @@ -9,7 +9,7 @@ become: false ansible.builtin.get_url: url: "{{ fail2ban_exporter_binary_url }}" - dest: "/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: "/tmp/fail2ban_exporter_{{ fail2ban_exporter_version }}_linux_{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/tmp/fail2ban_exporter" + src: "{{ fail2ban_exporter_archive_path }}/fail2ban_exporter" dest: "{{ fail2ban_exporter_binary_install_dir }}/fail2ban_exporter" mode: 0755 owner: root diff --git a/roles/ipmi_exporter/defaults/main.yml b/roles/ipmi_exporter/defaults/main.yml index f9b2ffe8a..4635c988f 100644 --- a/roles/ipmi_exporter/defaults/main.yml +++ b/roles/ipmi_exporter/defaults/main.yml @@ -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 diff --git a/roles/ipmi_exporter/meta/argument_specs.yml b/roles/ipmi_exporter/meta/argument_specs.yml index 8217f9457..7142d0734 100644 --- a/roles/ipmi_exporter/meta/argument_specs.yml +++ b/roles/ipmi_exporter/meta/argument_specs.yml @@ -68,3 +68,6 @@ argument_specs: - "I(Advanced)" - "ipmi_exporter user" default: "ipmi-exp" + ipmi_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/ipmi_exporter/tasks/install.yml b/roles/ipmi_exporter/tasks/install.yml index 9ebd6da24..b251a58f8 100644 --- a/roles/ipmi_exporter/tasks/install.yml +++ b/roles/ipmi_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ ipmi_exporter_binary_url }}" - dest: "/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: "/tmp/ipmi_exporter-{{ ipmi_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/memcached_exporter/defaults/main.yml b/roles/memcached_exporter/defaults/main.yml index 56e2aa7db..652f55a1e 100644 --- a/roles/memcached_exporter/defaults/main.yml +++ b/roles/memcached_exporter/defaults/main.yml @@ -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 diff --git a/roles/memcached_exporter/meta/argument_specs.yml b/roles/memcached_exporter/meta/argument_specs.yml index 81344eba1..011142529 100644 --- a/roles/memcached_exporter/meta/argument_specs.yml +++ b/roles/memcached_exporter/meta/argument_specs.yml @@ -70,3 +70,6 @@ argument_specs: - "I(Advanced)" - "memcached_exporter user" default: "memcached-exp" + memcached_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/memcached_exporter/tasks/install.yml b/roles/memcached_exporter/tasks/install.yml index 9336428af..86404166d 100644 --- a/roles/memcached_exporter/tasks/install.yml +++ b/roles/memcached_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ memcached_exporter_binary_url }}" - dest: "/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: "/tmp/memcached_exporter-{{ memcached_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/mongodb_exporter/defaults/main.yml b/roles/mongodb_exporter/defaults/main.yml index ddb7b0893..0e4e0f674 100644 --- a/roles/mongodb_exporter/defaults/main.yml +++ b/roles/mongodb_exporter/defaults/main.yml @@ -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 diff --git a/roles/mongodb_exporter/meta/argument_specs.yml b/roles/mongodb_exporter/meta/argument_specs.yml index 780fe0f5e..ad089ede7 100644 --- a/roles/mongodb_exporter/meta/argument_specs.yml +++ b/roles/mongodb_exporter/meta/argument_specs.yml @@ -118,3 +118,6 @@ argument_specs: - "I(Advanced)" - "mongodb_exporter user" default: "mongodb-exp" + mongodb_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/mongodb_exporter/tasks/install.yml b/roles/mongodb_exporter/tasks/install.yml index 92b447911..2d9049eb1 100644 --- a/roles/mongodb_exporter/tasks/install.yml +++ b/roles/mongodb_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ mongodb_exporter_binary_url }}" - dest: "/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: "/tmp/mongodb_exporter-{{ mongodb_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/mysqld_exporter/defaults/main.yml b/roles/mysqld_exporter/defaults/main.yml index d63f547f1..3e7a6c2d5 100644 --- a/roles/mysqld_exporter/defaults/main.yml +++ b/roles/mysqld_exporter/defaults/main.yml @@ -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 diff --git a/roles/mysqld_exporter/meta/argument_specs.yml b/roles/mysqld_exporter/meta/argument_specs.yml index 35cdf7488..d2e82e371 100644 --- a/roles/mysqld_exporter/meta/argument_specs.yml +++ b/roles/mysqld_exporter/meta/argument_specs.yml @@ -91,3 +91,6 @@ argument_specs: - "I(Advanced)" - "MySQLd Exporter user" default: "mysqld-exp" + mysqld_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/mysqld_exporter/tasks/install.yml b/roles/mysqld_exporter/tasks/install.yml index d9a08b57b..e114d666c 100644 --- a/roles/mysqld_exporter/tasks/install.yml +++ b/roles/mysqld_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ mysqld_exporter_binary_url }}" - dest: "/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: "/tmp/mysqld_exporter-{{ mysqld_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/nginx_exporter/defaults/main.yml b/roles/nginx_exporter/defaults/main.yml index 79138ea9f..4ee4e3bf8 100644 --- a/roles/nginx_exporter/defaults/main.yml +++ b/roles/nginx_exporter/defaults/main.yml @@ -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 diff --git a/roles/nginx_exporter/meta/argument_specs.yml b/roles/nginx_exporter/meta/argument_specs.yml index e232c8f7d..7fa28fd4d 100644 --- a/roles/nginx_exporter/meta/argument_specs.yml +++ b/roles/nginx_exporter/meta/argument_specs.yml @@ -73,3 +73,6 @@ argument_specs: - "I(Advanced)" - "nginx_exporter user" default: "nginx-exp" + nginx_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/nginx_exporter/tasks/install.yml b/roles/nginx_exporter/tasks/install.yml index 6230d43e2..efc796785 100644 --- a/roles/nginx_exporter/tasks/install.yml +++ b/roles/nginx_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ nginx_exporter_binary_url }}" - dest: "/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: "/tmp/nginx-prometheus-exporter_{{ nginx_exporter_version }}_linux_{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/node_exporter/defaults/main.yml b/roles/node_exporter/defaults/main.yml index 116ed0e3f..e8f39fe34 100644 --- a/roles/node_exporter/defaults/main.yml +++ b/roles/node_exporter/defaults/main.yml @@ -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 diff --git a/roles/node_exporter/meta/argument_specs.yml b/roles/node_exporter/meta/argument_specs.yml index c7385a70b..4f0190035 100644 --- a/roles/node_exporter/meta/argument_specs.yml +++ b/roles/node_exporter/meta/argument_specs.yml @@ -81,3 +81,6 @@ argument_specs: - "I(Advanced)" - "Node exporter user" default: "node-exp" + node_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/node_exporter/tasks/install.yml b/roles/node_exporter/tasks/install.yml index 4aa589373..fd21ec6e4 100644 --- a/roles/node_exporter/tasks/install.yml +++ b/roles/node_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ node_exporter_binary_url }}" - dest: "/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: "/tmp/node_exporter-{{ node_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/postgres_exporter/defaults/main.yml b/roles/postgres_exporter/defaults/main.yml index 6b0e4e470..3d301ab65 100644 --- a/roles/postgres_exporter/defaults/main.yml +++ b/roles/postgres_exporter/defaults/main.yml @@ -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 diff --git a/roles/postgres_exporter/meta/argument_specs.yml b/roles/postgres_exporter/meta/argument_specs.yml index 3bad0e48c..873c8777e 100644 --- a/roles/postgres_exporter/meta/argument_specs.yml +++ b/roles/postgres_exporter/meta/argument_specs.yml @@ -89,3 +89,6 @@ argument_specs: - "I(Advanced)" - "PostgreSQL Exporter user" default: "postgres-exp" + postgres_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/postgres_exporter/tasks/install.yml b/roles/postgres_exporter/tasks/install.yml index fcde13764..f1311328f 100644 --- a/roles/postgres_exporter/tasks/install.yml +++ b/roles/postgres_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ postgres_exporter_binary_url }}" - dest: "/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: "/tmp/postgres_exporter-{{ postgres_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/prometheus/defaults/main.yml b/roles/prometheus/defaults/main.yml index 307921b8e..e4ecb6fef 100644 --- a/roles/prometheus/defaults/main.yml +++ b/roles/prometheus/defaults/main.yml @@ -231,3 +231,6 @@ prometheus_system_group: 'prometheus' prometheus_system_user: "{{ prometheus_system_group }}" prometheus_stop_timeout: '600s' + +# Local path to stash the archive and its extraction +prometheus_archive_path: /tmp diff --git a/roles/prometheus/meta/argument_specs.yml b/roles/prometheus/meta/argument_specs.yml index 2f9cf91c5..fe8ac3402 100644 --- a/roles/prometheus/meta/argument_specs.yml +++ b/roles/prometheus/meta/argument_specs.yml @@ -165,3 +165,6 @@ argument_specs: - "How long to wait for Prometheus to shutdown. This is passed as a systemd TimeoutStopSec time spec." type: "str" default: "600s" + prometheus_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/prometheus/tasks/install.yml b/roles/prometheus/tasks/install.yml index 4193c4ced..2d2893584 100644 --- a/roles/prometheus/tasks/install.yml +++ b/roles/prometheus/tasks/install.yml @@ -44,7 +44,7 @@ become: false ansible.builtin.get_url: url: "{{ prometheus_binary_url }}" - dest: "/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: "/tmp/prometheus-{{ prometheus_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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: "/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 diff --git a/roles/pushgateway/defaults/main.yml b/roles/pushgateway/defaults/main.yml index 3a6344eb6..201fd9fa1 100644 --- a/roles/pushgateway/defaults/main.yml +++ b/roles/pushgateway/defaults/main.yml @@ -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 diff --git a/roles/pushgateway/meta/argument_specs.yml b/roles/pushgateway/meta/argument_specs.yml index 05348925f..cb233d11b 100644 --- a/roles/pushgateway/meta/argument_specs.yml +++ b/roles/pushgateway/meta/argument_specs.yml @@ -60,3 +60,6 @@ argument_specs: - "I(Advanced)" - "Pushgateway user" default: "pushgateway" + pushgateway_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/pushgateway/tasks/install.yml b/roles/pushgateway/tasks/install.yml index 45944b075..3ca872f92 100644 --- a/roles/pushgateway/tasks/install.yml +++ b/roles/pushgateway/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ pushgateway_binary_url }}" - dest: "/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: "/tmp/pushgateway-{{ pushgateway_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/redis_exporter/defaults/main.yml b/roles/redis_exporter/defaults/main.yml index 75ef80c28..3cdeba1da 100644 --- a/roles/redis_exporter/defaults/main.yml +++ b/roles/redis_exporter/defaults/main.yml @@ -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 diff --git a/roles/redis_exporter/meta/argument_specs.yml b/roles/redis_exporter/meta/argument_specs.yml index f883365dc..e737539b3 100644 --- a/roles/redis_exporter/meta/argument_specs.yml +++ b/roles/redis_exporter/meta/argument_specs.yml @@ -179,3 +179,6 @@ argument_specs: - "I(Advanced)" - "redis_exporter user" default: "redis-exp" + redis_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/redis_exporter/tasks/install.yml b/roles/redis_exporter/tasks/install.yml index b84413ec1..3212b64d9 100644 --- a/roles/redis_exporter/tasks/install.yml +++ b/roles/redis_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ redis_exporter_binary_url }}" - dest: "/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: "/tmp/redis_exporter-{{ redis_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/smartctl_exporter/defaults/main.yml b/roles/smartctl_exporter/defaults/main.yml index 62f91f130..708652cf9 100644 --- a/roles/smartctl_exporter/defaults/main.yml +++ b/roles/smartctl_exporter/defaults/main.yml @@ -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 diff --git a/roles/smartctl_exporter/meta/argument_specs.yml b/roles/smartctl_exporter/meta/argument_specs.yml index 54d1b6038..cbd3a2054 100644 --- a/roles/smartctl_exporter/meta/argument_specs.yml +++ b/roles/smartctl_exporter/meta/argument_specs.yml @@ -90,3 +90,6 @@ argument_specs: - "I(Advanced)" - "Smartctl exporter user" default: "smartctl-exp" + smartctl_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/smartctl_exporter/tasks/install.yml b/roles/smartctl_exporter/tasks/install.yml index 9da034016..d7285c326 100644 --- a/roles/smartctl_exporter/tasks/install.yml +++ b/roles/smartctl_exporter/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ smartctl_exporter_binary_url }}" - dest: "/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: "/tmp/smartctl_exporter-{{ smartctl_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/smokeping_prober/defaults/main.yml b/roles/smokeping_prober/defaults/main.yml index e73414970..d25a9a102 100644 --- a/roles/smokeping_prober/defaults/main.yml +++ b/roles/smokeping_prober/defaults/main.yml @@ -33,3 +33,6 @@ smokeping_prober_binary_install_dir: "/usr/local/bin" smokeping_prober_config_dir: "/etc/smokeping_prober" smokeping_prober_system_group: "smokeping" smokeping_prober_system_user: "{{ smokeping_prober_system_group }}" + +# Local path to stash the archive and its extraction +smokeping_archive_path: /tmp diff --git a/roles/smokeping_prober/meta/argument_specs.yml b/roles/smokeping_prober/meta/argument_specs.yml index 4bca382e3..221f46009 100644 --- a/roles/smokeping_prober/meta/argument_specs.yml +++ b/roles/smokeping_prober/meta/argument_specs.yml @@ -69,3 +69,6 @@ argument_specs: - "I(Advanced)" - "Smokeping Prober user" default: "smokeping" + smokeping_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/smokeping_prober/tasks/install.yml b/roles/smokeping_prober/tasks/install.yml index e6b3979ef..cdf161ef4 100644 --- a/roles/smokeping_prober/tasks/install.yml +++ b/roles/smokeping_prober/tasks/install.yml @@ -27,7 +27,7 @@ become: false ansible.builtin.get_url: url: "{{ smokeping_prober_binary_url }}" - dest: "/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: "/tmp/smokeping_prober-{{ smokeping_prober_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/snmp_exporter/defaults/main.yml b/roles/snmp_exporter/defaults/main.yml index 1fe672bd0..2d5a8b0d4 100644 --- a/roles/snmp_exporter/defaults/main.yml +++ b/roles/snmp_exporter/defaults/main.yml @@ -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 diff --git a/roles/snmp_exporter/meta/argument_specs.yml b/roles/snmp_exporter/meta/argument_specs.yml index 838bf1fc7..76fa11dd8 100644 --- a/roles/snmp_exporter/meta/argument_specs.yml +++ b/roles/snmp_exporter/meta/argument_specs.yml @@ -41,3 +41,6 @@ argument_specs: - "I(Advanced)" - "Directory to install snmp_exporter binary" default: "/usr/local/bin" + snmp_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/snmp_exporter/tasks/install.yml b/roles/snmp_exporter/tasks/install.yml index ecf03d795..dce9d9bc1 100644 --- a/roles/snmp_exporter/tasks/install.yml +++ b/roles/snmp_exporter/tasks/install.yml @@ -9,7 +9,7 @@ become: false ansible.builtin.get_url: url: "{{ snmp_exporter_binary_url }}" - dest: "/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: "/tmp/snmp_exporter-{{ snmp_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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 diff --git a/roles/systemd_exporter/defaults/main.yml b/roles/systemd_exporter/defaults/main.yml index 2eda04d5f..ffad95e84 100644 --- a/roles/systemd_exporter/defaults/main.yml +++ b/roles/systemd_exporter/defaults/main.yml @@ -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 diff --git a/roles/systemd_exporter/meta/argument_specs.yml b/roles/systemd_exporter/meta/argument_specs.yml index 6042e039c..ec96c2da3 100644 --- a/roles/systemd_exporter/meta/argument_specs.yml +++ b/roles/systemd_exporter/meta/argument_specs.yml @@ -67,3 +67,6 @@ argument_specs: default: "systemd-exporter" systemd_exporter_log_level: description: Only log messages with the given severity or above. + systemd_exporter_archive_path: + description: 'Local path to stash the archive and its extraction' + default: "/tmp" diff --git a/roles/systemd_exporter/tasks/install.yml b/roles/systemd_exporter/tasks/install.yml index 1822fac0a..5236206e0 100644 --- a/roles/systemd_exporter/tasks/install.yml +++ b/roles/systemd_exporter/tasks/install.yml @@ -26,7 +26,7 @@ become: false ansible.builtin.get_url: url: "{{ systemd_exporter_binary_url }}" - dest: "/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: "/tmp/systemd_exporter-{{ systemd_exporter_version }}.linux-{{ go_arch }}.tar.gz" - dest: "/tmp" - creates: "/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: "/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