diff --git a/roles/alertmanager/defaults/main.yml b/roles/alertmanager/defaults/main.yml index ac877bca2..3b389adfc 100644 --- a/roles/alertmanager/defaults/main.yml +++ b/roles/alertmanager/defaults/main.yml @@ -1,7 +1,7 @@ --- alertmanager_version: 0.27.0 alertmanager_binary_url: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/\ - alertmanager-{{ alertmanager_version }}.{{ ansible_system | lower }}-{{ _alertmanager_go_ansible_arch }}.tar.gz" + alertmanager-{{ alertmanager_version }}.{{ ansible_facts['system'] | lower }}-{{ _alertmanager_go_ansible_arch }}.tar.gz" alertmanager_checksums_url: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/sha256sums.txt" alertmanager_config_dir: /etc/alertmanager @@ -136,7 +136,7 @@ alertmanager_amtool_config_output: 'extended' alertmanager_binary_install_dir: '/usr/local/bin' # Local path to stash the archive and its extraction -alertmanager_local_cache_path: "/tmp/alertmanager-{{ ansible_system | lower }}-{{ _alertmanager_go_ansible_arch }}/{{ alertmanager_version }}" +alertmanager_local_cache_path: "/tmp/alertmanager-{{ ansible_facts['system'] | lower }}-{{ _alertmanager_go_ansible_arch }}/{{ alertmanager_version }}" alertmanager_system_user: alertmanager alertmanager_system_group: "{{ alertmanager_system_user }}" diff --git a/roles/alertmanager/meta/argument_specs.yml b/roles/alertmanager/meta/argument_specs.yml index 789e2cb84..1cfeaebb1 100644 --- a/roles/alertmanager/meta/argument_specs.yml +++ b/roles/alertmanager/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: 0.27.0 alertmanager_binary_url: description: "URL of the alertmanager binaries .tar.gz file" - default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/alertmanager-{{ alertmanager_version }}.{{ ansible_system | lower }}-{{ _alertmanager_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/alertmanager-{{ alertmanager_version }}.{{ ansible_facts['system'] | lower }}-{{ _alertmanager_go_ansible_arch }}.tar.gz" alertmanager_checksums_url: description: "URL of the alertmanager checksums file" default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/sha256sums.txt" @@ -108,7 +108,7 @@ argument_specs: default: "extended" alertmanager_local_cache_path: description: 'Local path to stash the archive and its extraction' - default: "/tmp/alertmanager-{{ ansible_system | lower }}-{{ _alertmanager_go_ansible_arch }}/{{ alertmanager_version }}" + default: "/tmp/alertmanager-{{ ansible_facts['system'] | lower }}-{{ _alertmanager_go_ansible_arch }}/{{ alertmanager_version }}" alertmanager_system_user: description: - "I(Advanced)" diff --git a/roles/alertmanager/tasks/main.yml b/roles/alertmanager/tasks/main.yml index 902a316d9..ed4abdce1 100644 --- a/roles/alertmanager/tasks/main.yml +++ b/roles/alertmanager/tasks/main.yml @@ -34,7 +34,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ alertmanager_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - alertmanager - configure diff --git a/roles/alertmanager/vars/main.yml b/roles/alertmanager/vars/main.yml index e5bfb48ad..dfef222a1 100644 --- a/roles/alertmanager/vars/main.yml +++ b/roles/alertmanager/vars/main.yml @@ -3,7 +3,7 @@ _alertmanager_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" # The expected location of the amtool configuration file _alertmanager_amtool_config_dir: '/etc/amtool' diff --git a/roles/bind_exporter/defaults/main.yml b/roles/bind_exporter/defaults/main.yml index c3f4165cc..2e98d4665 100644 --- a/roles/bind_exporter/defaults/main.yml +++ b/roles/bind_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- bind_exporter_version: 0.8.0 bind_exporter_binary_url: "https://github.com/{{ _bind_exporter_repo }}/releases/download/v{{ bind_exporter_version }}/\ - bind_exporter-{{ bind_exporter_version }}.{{ ansible_system | lower }}-{{ _bind_exporter_go_ansible_arch }}.tar.gz" + bind_exporter-{{ bind_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _bind_exporter_go_ansible_arch }}.tar.gz" bind_exporter_checksums_url: "https://github.com/{{ _bind_exporter_repo }}/releases/download/v{{ bind_exporter_version }}/sha256sums.txt" bind_exporter_web_listen_address: "0.0.0.0:9119" @@ -23,4 +23,4 @@ bind_exporter_system_user: "{{ bind_exporter_system_group }}" bind_exporter_binary_install_dir: "/usr/local/bin" bind_exporter_config_dir: "/etc/bind_exporter" -bind_exporter_local_cache_path: "/tmp/bind_exporter-{{ ansible_system | lower }}-{{ _bind_exporter_go_ansible_arch }}/{{ bind_exporter_version }}" +bind_exporter_local_cache_path: "/tmp/bind_exporter-{{ ansible_facts['system'] | lower }}-{{ _bind_exporter_go_ansible_arch }}/{{ bind_exporter_version }}" diff --git a/roles/bind_exporter/meta/argument_specs.yml b/roles/bind_exporter/meta/argument_specs.yml index 68e0b5842..6b631471b 100644 --- a/roles/bind_exporter/meta/argument_specs.yml +++ b/roles/bind_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.8.0" bind_exporter_binary_url: description: "URL of the bind_exporter binaries .tar.gz file" - default: "https://github.com/{{ _bind_exporter_repo }}/releases/download/v{{ bind_exporter_version }}/bind_exporter-{{ bind_exporter_version }}.{{ ansible_system | lower }}-{{ _bind_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _bind_exporter_repo }}/releases/download/v{{ bind_exporter_version }}/bind_exporter-{{ bind_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _bind_exporter_go_ansible_arch }}.tar.gz" bind_exporter_checksums_url: description: "URL of the bind_exporter checksums file" default: "https://github.com/{{ _bind_exporter_repo }}/releases/download/v{{ bind_exporter_version }}/sha256sums.txt" @@ -81,4 +81,4 @@ argument_specs: default: "bind-exp" bind_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/bind_exporter-{{ ansible_system | lower }}-{{ _bind_exporter_go_ansible_arch }}/{{ bind_exporter_version }}" + default: "/tmp/bind_exporter-{{ ansible_facts['system'] | lower }}-{{ _bind_exporter_go_ansible_arch }}/{{ bind_exporter_version }}" diff --git a/roles/bind_exporter/tasks/main.yml b/roles/bind_exporter/tasks/main.yml index fcf502183..ff8c7f80d 100644 --- a/roles/bind_exporter/tasks/main.yml +++ b/roles/bind_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ bind_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - bind_exporter_configure diff --git a/roles/bind_exporter/templates/bind_exporter.service.j2 b/roles/bind_exporter/templates/bind_exporter.service.j2 index b2896d605..9a12385af 100644 --- a/roles/bind_exporter/templates/bind_exporter.service.j2 +++ b/roles/bind_exporter/templates/bind_exporter.service.j2 @@ -37,7 +37,7 @@ RestartSec=1 StartLimitInterval=0 {% set protect_home = 'yes' %} -{% for m in ansible_mounts if m.mount.startswith('/home') %} +{% for m in ansible_facts['mounts'] if m.mount.startswith('/home') %} {% set protect_home = 'read-only' %} {% endfor %} ProtectHome={{ protect_home }} diff --git a/roles/bind_exporter/vars/main.yml b/roles/bind_exporter/vars/main.yml index 5460cb663..bb287a99a 100644 --- a/roles/bind_exporter/vars/main.yml +++ b/roles/bind_exporter/vars/main.yml @@ -3,7 +3,7 @@ _bind_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _bind_exporter_repo: "prometheus-community/bind_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _bind_exporter_binaries: ['bind_exporter'] diff --git a/roles/blackbox_exporter/defaults/main.yml b/roles/blackbox_exporter/defaults/main.yml index ae9d04f9d..f128a568b 100644 --- a/roles/blackbox_exporter/defaults/main.yml +++ b/roles/blackbox_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- blackbox_exporter_version: 0.25.0 blackbox_exporter_binary_url: "https://github.com/{{ _blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/\ - blackbox_exporter-{{ blackbox_exporter_version }}.{{ ansible_system | lower }}-{{ _blackbox_exporter_go_ansible_arch }}.tar.gz" + blackbox_exporter-{{ blackbox_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _blackbox_exporter_go_ansible_arch }}.tar.gz" blackbox_exporter_checksums_url: "https://github.com/{{ _blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/sha256sums.txt" blackbox_exporter_web_listen_address: "0.0.0.0:9115" @@ -72,7 +72,7 @@ blackbox_exporter_configuration_modules: blackbox_exporter_config_dir: /etc/blackbox_exporter # Local path to stash the archive and its extraction -blackbox_exporter_local_cache_path: "/tmp/blackbox_exporter-{{ ansible_system | lower }}-{{ _blackbox_exporter_go_ansible_arch }}/\ +blackbox_exporter_local_cache_path: "/tmp/blackbox_exporter-{{ ansible_facts['system'] | lower }}-{{ _blackbox_exporter_go_ansible_arch }}/\ {{ blackbox_exporter_version }}" blackbox_exporter_binary_install_dir: "/usr/local/bin" diff --git a/roles/blackbox_exporter/meta/argument_specs.yml b/roles/blackbox_exporter/meta/argument_specs.yml index fc83cb41d..d3e8d2c2d 100644 --- a/roles/blackbox_exporter/meta/argument_specs.yml +++ b/roles/blackbox_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.25.0" blackbox_exporter_binary_url: description: "URL of the blackbox_exporter binaries .tar.gz file" - default: "https://github.com/{{ _blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/blackbox_exporter-{{ blackbox_exporter_version }}.{{ ansible_system | lower }}-{{ _blackbox_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/blackbox_exporter-{{ blackbox_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _blackbox_exporter_go_ansible_arch }}.tar.gz" blackbox_exporter_checksums_url: description: "URL of the blackbox exporter checksums file" default: "https://github.com/{{ _blackbox_exporter_repo }}/releases/download/v{{ blackbox_exporter_version }}/sha256sums.txt" @@ -49,4 +49,4 @@ argument_specs: default: "blackbox-exp" blackbox_exporter_local_cache_path: description: 'Local path to stash the archive and its extraction' - default: "/tmp/blackbox_exporter-{{ ansible_system | lower }}-{{ _blackbox_exporter_go_ansible_arch }}/{{ blackbox_exporter_version }}" + default: "/tmp/blackbox_exporter-{{ ansible_facts['system'] | lower }}-{{ _blackbox_exporter_go_ansible_arch }}/{{ blackbox_exporter_version }}" diff --git a/roles/blackbox_exporter/tasks/main.yml b/roles/blackbox_exporter/tasks/main.yml index 76c8359ec..5e7eb82dc 100644 --- a/roles/blackbox_exporter/tasks/main.yml +++ b/roles/blackbox_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ blackbox_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - blackbox_exporter_configure diff --git a/roles/blackbox_exporter/vars/main.yml b/roles/blackbox_exporter/vars/main.yml index 1ff00abca..c8b6d0261 100644 --- a/roles/blackbox_exporter/vars/main.yml +++ b/roles/blackbox_exporter/vars/main.yml @@ -3,7 +3,7 @@ _blackbox_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _blackbox_exporter_repo: "prometheus/blackbox_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _blackbox_exporter_binaries: ['blackbox_exporter'] diff --git a/roles/cadvisor/defaults/main.yml b/roles/cadvisor/defaults/main.yml index 10a42fd6f..1892643ce 100644 --- a/roles/cadvisor/defaults/main.yml +++ b/roles/cadvisor/defaults/main.yml @@ -1,7 +1,7 @@ --- cadvisor_version: 0.49.1 cadvisor_binary_url: "https://github.com/{{ _cadvisor_repo }}/releases/download/v{{ cadvisor_version }}/\ - cadvisor-v{{ cadvisor_version }}-{{ ansible_system | lower }}-{{ _cadvisor_go_ansible_arch }}" + cadvisor-v{{ cadvisor_version }}-{{ ansible_facts['system'] | lower }}-{{ _cadvisor_go_ansible_arch }}" cadvisor_listen_ip: "0.0.0.0" cadvisor_port: "8080" @@ -18,6 +18,6 @@ cadvisor_system_group: "root" cadvisor_system_user: "{{ cadvisor_system_group }}" # Local path to stash the archive and its extraction -cadvisor_local_cache_path: "/tmp/cadvisor-{{ ansible_system | lower }}-{{ _cadvisor_go_ansible_arch }}/{{ cadvisor_version }}" +cadvisor_local_cache_path: "/tmp/cadvisor-{{ ansible_facts['system'] | lower }}-{{ _cadvisor_go_ansible_arch }}/{{ cadvisor_version }}" cadvisor_binary_install_dir: "/usr/local/bin" diff --git a/roles/cadvisor/meta/argument_specs.yml b/roles/cadvisor/meta/argument_specs.yml index c9cf3918e..7d3330e10 100644 --- a/roles/cadvisor/meta/argument_specs.yml +++ b/roles/cadvisor/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.49.1" cadvisor_binary_url: description: "URL of the cadvisor binary file" - default: "https://github.com/{{ _cadvisor_repo }}/releases/download/v{{ cadvisor_version }}/cadvisor-v{{ cadvisor_version }}-{{ ansible_system | lower }}-{{ _cadvisor_go_ansible_arch }}" + default: "https://github.com/{{ _cadvisor_repo }}/releases/download/v{{ cadvisor_version }}/cadvisor-v{{ cadvisor_version }}-{{ ansible_facts['system'] | lower }}-{{ _cadvisor_go_ansible_arch }}" cadvisor_listen_ip: description: "Address on which cadvisor will listen" default: "0.0.0.0" @@ -88,4 +88,4 @@ argument_specs: default: "/usr/local/bin" cadvisor_local_cache_path: description: 'Local path to stash the archive and its extraction' - default: "/tmp/cadvisor-{{ ansible_system | lower }}-{{ _cadvisor_go_ansible_arch }}/{{ cadvisor_version }}" + default: "/tmp/cadvisor-{{ ansible_facts['system'] | lower }}-{{ _cadvisor_go_ansible_arch }}/{{ cadvisor_version }}" diff --git a/roles/cadvisor/tasks/main.yml b/roles/cadvisor/tasks/main.yml index 7b6a1263d..3d544a555 100644 --- a/roles/cadvisor/tasks/main.yml +++ b/roles/cadvisor/tasks/main.yml @@ -29,7 +29,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ cadvisor_port }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - cadvisor_configure diff --git a/roles/cadvisor/vars/main.yml b/roles/cadvisor/vars/main.yml index 8a1da1d00..52cbf0140 100644 --- a/roles/cadvisor/vars/main.yml +++ b/roles/cadvisor/vars/main.yml @@ -3,7 +3,7 @@ _cadvisor_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _cadvisor_repo: "google/cadvisor" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _cadvisor_binaries: ['cadvisor'] diff --git a/roles/chrony_exporter/defaults/main.yml b/roles/chrony_exporter/defaults/main.yml index 8f8a2c1fd..6985b27fd 100644 --- a/roles/chrony_exporter/defaults/main.yml +++ b/roles/chrony_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- chrony_exporter_version: 0.11.0 chrony_exporter_binary_url: "https://github.com/{{ _chrony_exporter_repo }}/releases/download/v{{ chrony_exporter_version }}/\ - chrony_exporter-{{ chrony_exporter_version }}.{{ ansible_system | lower }}-{{ _chrony_exporter_go_ansible_arch }}.tar.gz" + chrony_exporter-{{ chrony_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _chrony_exporter_go_ansible_arch }}.tar.gz" chrony_exporter_checksums_url: "https://github.com/{{ _chrony_exporter_repo }}/releases/download/v{{ chrony_exporter_version }}/sha256sums.txt" chrony_exporter_web_listen_address: "0.0.0.0:9123" @@ -24,7 +24,7 @@ chrony_exporter_system_group: "{{ chrony_exporter_system_user }}" # Local path to stash the archive and its extraction -chrony_exporter_local_cache_path: "/tmp/chrony_exporter-{{ ansible_system | lower }}-{{ _chrony_exporter_go_ansible_arch }}/{{ chrony_exporter_version }}" +chrony_exporter_local_cache_path: "/tmp/chrony_exporter-{{ ansible_facts['system'] | lower }}-{{ _chrony_exporter_go_ansible_arch }}/{{ chrony_exporter_version }}" chrony_exporter_binary_install_dir: "/usr/local/bin" chrony_exporter_config_dir: "/etc/chrony_exporter" diff --git a/roles/chrony_exporter/meta/argument_specs.yml b/roles/chrony_exporter/meta/argument_specs.yml index d87c20c62..75484f8a4 100644 --- a/roles/chrony_exporter/meta/argument_specs.yml +++ b/roles/chrony_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.11.0" chrony_exporter_binary_url: description: "URL of the chrony_exporter binaries .tar.gz file" - default: "https://github.com/{{ _chrony_exporter_repo }}/releases/download/v{{ chrony_exporter_version }}/chrony_exporter-{{ chrony_exporter_version }}.{{ ansible_system | lower }}-{{ _chrony_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _chrony_exporter_repo }}/releases/download/v{{ chrony_exporter_version }}/chrony_exporter-{{ chrony_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _chrony_exporter_go_ansible_arch }}.tar.gz" chrony_exporter_checksums_url: description: "URL of the chrony_exporter checksums file" default: "https://github.com/{{ _chrony_exporter_repo }}/releases/download/v{{ chrony_exporter_version }}/sha256sums.txt" @@ -66,7 +66,7 @@ argument_specs: default: "/usr/local/bin" chrony_exporter_local_cache_path: description: 'Local path to stash the archive and its extraction' - default: "/tmp/chrony_exporter-{{ ansible_system | lower }}-{{ _chrony_exporter_go_ansible_arch }}/{{ chrony_exporter_version }}" + default: "/tmp/chrony_exporter-{{ ansible_facts['system'] | lower }}-{{ _chrony_exporter_go_ansible_arch }}/{{ chrony_exporter_version }}" chrony_exporter_config_dir: description: "Path to directory with chrony_exporter configuration" default: "/etc/chrony_exporter" diff --git a/roles/chrony_exporter/tasks/main.yml b/roles/chrony_exporter/tasks/main.yml index e2d8bd57b..40cfc3ce4 100644 --- a/roles/chrony_exporter/tasks/main.yml +++ b/roles/chrony_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ chrony_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - chrony_exporter_configure diff --git a/roles/chrony_exporter/vars/main.yml b/roles/chrony_exporter/vars/main.yml index 0314b49e5..eea0461ef 100644 --- a/roles/chrony_exporter/vars/main.yml +++ b/roles/chrony_exporter/vars/main.yml @@ -3,7 +3,7 @@ _chrony_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _chrony_exporter_repo: "superq/chrony_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" chrony_exporter_binary_install_dir: "/usr/local/bin" diff --git a/roles/fail2ban_exporter/defaults/main.yml b/roles/fail2ban_exporter/defaults/main.yml index c735caade..f9125c942 100644 --- a/roles/fail2ban_exporter/defaults/main.yml +++ b/roles/fail2ban_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- fail2ban_exporter_version: 0.10.1 fail2ban_exporter_binary_url: "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/releases/v{{ fail2ban_exporter_version }}/downloads/\ - fail2ban_exporter_{{ fail2ban_exporter_version }}_{{ ansible_system | lower }}_{{ _fail2ban_exporter_go_ansible_arch }}.tar.gz" + fail2ban_exporter_{{ fail2ban_exporter_version }}_{{ ansible_facts['system'] | lower }}_{{ _fail2ban_exporter_go_ansible_arch }}.tar.gz" fail2ban_exporter_checksums_url: "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/releases/v{{ fail2ban_exporter_version }}/downloads/\ fail2ban_exporter_{{ fail2ban_exporter_version }}_checksums.txt" @@ -15,5 +15,5 @@ fail2ban_exporter_system_user: "root" fail2ban_exporter_system_group: "{{ fail2ban_exporter_system_user }}" # Local path to stash the archive and its extraction -fail2ban_exporter_local_cache_path: "/tmp/fail2ban_exporter-{{ ansible_system | lower }}-{{ _fail2ban_exporter_go_ansible_arch }}/\ +fail2ban_exporter_local_cache_path: "/tmp/fail2ban_exporter-{{ ansible_facts['system'] | lower }}-{{ _fail2ban_exporter_go_ansible_arch }}/\ {{ fail2ban_exporter_version }}" diff --git a/roles/fail2ban_exporter/meta/argument_specs.yml b/roles/fail2ban_exporter/meta/argument_specs.yml index cc840d6de..6a3e80808 100644 --- a/roles/fail2ban_exporter/meta/argument_specs.yml +++ b/roles/fail2ban_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.10.1" fail2ban_exporter_binary_url: description: "URL of the fail2ban_exporter binaries .tar.gz file" - default: "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/releases/v{{ fail2ban_exporter_version }}/downloads/fail2ban_exporter_{{ fail2ban_exporter_version }}_{{ ansible_system | lower }}_{{ _fail2ban_exporter_go_ansible_arch }}.tar.gz" + default: "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/releases/v{{ fail2ban_exporter_version }}/downloads/fail2ban_exporter_{{ fail2ban_exporter_version }}_{{ ansible_facts['system'] | lower }}_{{ _fail2ban_exporter_go_ansible_arch }}.tar.gz" fail2ban_exporter_checksums_url: description: "URL of the fail2ban_exporter checksums file" default: "https://gitlab.com/hectorjsmith/fail2ban-prometheus-exporter/-/releases/v{{ fail2ban_exporter_version }}/downloads/fail2ban_exporter_{{ fail2ban_exporter_version }}_checksums.txt" @@ -39,7 +39,7 @@ argument_specs: - "Password to use to protect endpoints with basic auth" fail2ban_exporter_local_cache_path: description: 'Local path to stash the archive and its extraction' - default: "/tmp/fail2ban_exporter-{{ ansible_system | lower }}-{{ _fail2ban_exporter_go_ansible_arch }}/{{ fail2ban_exporter_version }}" + default: "/tmp/fail2ban_exporter-{{ ansible_facts['system'] | lower }}-{{ _fail2ban_exporter_go_ansible_arch }}/{{ fail2ban_exporter_version }}" fail2ban_exporter_system_user: description: - "I(Advanced)" diff --git a/roles/fail2ban_exporter/tasks/main.yml b/roles/fail2ban_exporter/tasks/main.yml index 50047a556..672d67263 100644 --- a/roles/fail2ban_exporter/tasks/main.yml +++ b/roles/fail2ban_exporter/tasks/main.yml @@ -29,7 +29,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ fail2ban_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - fail2ban_exporter_configure diff --git a/roles/fail2ban_exporter/vars/main.yml b/roles/fail2ban_exporter/vars/main.yml index f250a48fb..565a6b357 100644 --- a/roles/fail2ban_exporter/vars/main.yml +++ b/roles/fail2ban_exporter/vars/main.yml @@ -3,6 +3,6 @@ _fail2ban_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _fail2ban_exporter_repo: 24199687 _fail2ban_exporter_binaries: ['fail2ban_exporter'] diff --git a/roles/influxdb_exporter/defaults/main.yml b/roles/influxdb_exporter/defaults/main.yml index 270888681..143561868 100644 --- a/roles/influxdb_exporter/defaults/main.yml +++ b/roles/influxdb_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- influxdb_exporter_version: 0.12.0 influxdb_exporter_binary_url: "https://github.com/{{ _influxdb_exporter_repo }}/releases/download/v{{ influxdb_exporter_version }}/\ - influxdb_exporter-{{ influxdb_exporter_version }}.{{ ansible_system | lower }}-{{ _influxdb_exporter_go_ansible_arch }}.tar.gz" + influxdb_exporter-{{ influxdb_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _influxdb_exporter_go_ansible_arch }}.tar.gz" influxdb_exporter_checksums_url: "https://github.com/{{ _influxdb_exporter_repo }}/releases/download/v{{ influxdb_exporter_version }}/sha256sums.txt" influxdb_exporter_web_listen_address: "0.0.0.0:9122" @@ -19,4 +19,4 @@ influxdb_exporter_system_user: "{{ influxdb_exporter_system_group }}" influxdb_exporter_config_dir: "/etc/influxdb_exporter" # Local path to stash the archive and its extraction -influxdb_exporter_local_cache_path: "/tmp/influxdb_exporter-{{ ansible_system | lower }}-{{ _influxdb_exporter_go_ansible_arch }}/{{ influxdb_exporter_version }}" +influxdb_exporter_local_cache_path: "/tmp/influxdb_exporter-{{ ansible_facts['system'] | lower }}-{{ _influxdb_exporter_go_ansible_arch }}/{{ influxdb_exporter_version }}" diff --git a/roles/influxdb_exporter/meta/argument_specs.yml b/roles/influxdb_exporter/meta/argument_specs.yml index ad7b1d5c7..482194354 100644 --- a/roles/influxdb_exporter/meta/argument_specs.yml +++ b/roles/influxdb_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.12.0" influxdb_exporter_binary_url: description: "URL of the influxdb exporter binaries .tar.gz file" - default: "https://github.com/{{ _influxdb_exporter_repo }}/releases/download/v{{ influxdb_exporter_version }}/influxdb_exporter-{{ influxdb_exporter_version }}.{{ ansible_system | lower }}-{{ _influxdb_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _influxdb_exporter_repo }}/releases/download/v{{ influxdb_exporter_version }}/influxdb_exporter-{{ influxdb_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _influxdb_exporter_go_ansible_arch }}.tar.gz" influxdb_exporter_checksums_url: description: "URL of the influxdb exporter checksums file" default: "https://github.com/{{ _influxdb_exporter_repo }}/releases/download/v{{ influxdb_exporter_version }}/sha256sums.txt" @@ -60,7 +60,7 @@ argument_specs: default: "influxdb-exp" influxdb_exporter_local_cache_path: description: 'Local path to stash the archive and its extraction' - default: "/tmp/influxdb_exporter-{{ ansible_system | lower }}-{{ _influxdb_exporter_go_ansible_arch }}/{{ influxdb_exporter_version }}" + default: "/tmp/influxdb_exporter-{{ ansible_facts['system'] | lower }}-{{ _influxdb_exporter_go_ansible_arch }}/{{ influxdb_exporter_version }}" influxdb_exporter_config_dir: description: "Path to directory with influxdb_exporter configuration" default: "/etc/influxdb_exporter" diff --git a/roles/influxdb_exporter/tasks/main.yml b/roles/influxdb_exporter/tasks/main.yml index e244bff0b..a69cd38a5 100644 --- a/roles/influxdb_exporter/tasks/main.yml +++ b/roles/influxdb_exporter/tasks/main.yml @@ -36,7 +36,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ influxdb_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - influxdb_exporter - configure diff --git a/roles/influxdb_exporter/vars/main.yml b/roles/influxdb_exporter/vars/main.yml index ad5a957a3..6da1a81e3 100644 --- a/roles/influxdb_exporter/vars/main.yml +++ b/roles/influxdb_exporter/vars/main.yml @@ -3,7 +3,7 @@ _influxdb_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _influxdb_exporter_repo: "prometheus/influxdb_exporter" _influxdb_exporter_github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" diff --git a/roles/ipmi_exporter/defaults/main.yml b/roles/ipmi_exporter/defaults/main.yml index 8aeab188b..b1b9daf08 100644 --- a/roles/ipmi_exporter/defaults/main.yml +++ b/roles/ipmi_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- ipmi_exporter_version: 1.9.0 ipmi_exporter_binary_url: "https://github.com/{{ _ipmi_exporter_repo }}/releases/download/v{{ ipmi_exporter_version }}/\ - ipmi_exporter-{{ ipmi_exporter_version }}.{{ ansible_system | lower }}-{{ _ipmi_exporter_go_ansible_arch }}.tar.gz" + ipmi_exporter-{{ ipmi_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _ipmi_exporter_go_ansible_arch }}.tar.gz" ipmi_exporter_checksums_url: "https://github.com/{{ _ipmi_exporter_repo }}/releases/download/v{{ ipmi_exporter_version }}/sha256sums.txt" ipmi_exporter_modules: @@ -29,4 +29,4 @@ ipmi_exporter_system_group: "{{ ipmi_exporter_system_user }}" ipmi_exporter_config_dir: /etc/ipmi_exporter # Local path to stash the archive and its extraction -ipmi_exporter_local_cache_path: "/tmp/ipmi_exporter-{{ ansible_system | lower }}-{{ _ipmi_exporter_go_ansible_arch }}/{{ ipmi_exporter_version }}" +ipmi_exporter_local_cache_path: "/tmp/ipmi_exporter-{{ ansible_facts['system'] | lower }}-{{ _ipmi_exporter_go_ansible_arch }}/{{ ipmi_exporter_version }}" diff --git a/roles/ipmi_exporter/meta/argument_specs.yml b/roles/ipmi_exporter/meta/argument_specs.yml index 3c954a709..e84b5875d 100644 --- a/roles/ipmi_exporter/meta/argument_specs.yml +++ b/roles/ipmi_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "1.9.0" ipmi_exporter_binary_url: description: "URL of the ipmi_exporter binaries .tar.gz file" - default: "https://github.com/{{ _ipmi_exporter_repo }}/releases/download/v{{ ipmi_exporter_version }}/ipmi_exporter-{{ ipmi_exporter_version }}.{{ ansible_system | lower }}-{{ _ipmi_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _ipmi_exporter_repo }}/releases/download/v{{ ipmi_exporter_version }}/ipmi_exporter-{{ ipmi_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _ipmi_exporter_go_ansible_arch }}.tar.gz" ipmi_exporter_checksums_url: description: "URL of the ipmi_exporter checksums file" default: "https://github.com/{{ _ipmi_exporter_repo }}/releases/download/v{{ ipmi_exporter_version }}/sha256sums.txt" @@ -61,7 +61,7 @@ argument_specs: default: "ipmi-exp" ipmi_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/ipmi_exporter-{{ ansible_system | lower }}-{{ _ipmi_exporter_go_ansible_arch }}/{{ ipmi_exporter_version }}" + default: "/tmp/ipmi_exporter-{{ ansible_facts['system'] | lower }}-{{ _ipmi_exporter_go_ansible_arch }}/{{ ipmi_exporter_version }}" ipmi_exporter_config_dir: description: "Path to directory with ipmi_exporter configuration" default: "/etc/ipmi_exporter" diff --git a/roles/ipmi_exporter/tasks/main.yml b/roles/ipmi_exporter/tasks/main.yml index cb7317710..3ed9145dd 100644 --- a/roles/ipmi_exporter/tasks/main.yml +++ b/roles/ipmi_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ ipmi_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - ipmi_exporter_configure diff --git a/roles/ipmi_exporter/vars/main.yml b/roles/ipmi_exporter/vars/main.yml index f0dfaf389..2042bddc9 100644 --- a/roles/ipmi_exporter/vars/main.yml +++ b/roles/ipmi_exporter/vars/main.yml @@ -3,7 +3,7 @@ _ipmi_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _ipmi_exporter_repo: "prometheus-community/ipmi_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _ipmi_exporter_binaries: ['ipmi_exporter'] diff --git a/roles/memcached_exporter/defaults/main.yml b/roles/memcached_exporter/defaults/main.yml index 6a0805de2..b2e48e756 100644 --- a/roles/memcached_exporter/defaults/main.yml +++ b/roles/memcached_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- memcached_exporter_version: 0.15.0 memcached_exporter_binary_url: "https://github.com/{{ _memcached_exporter_repo }}/releases/download/v{{ memcached_exporter_version }}/\ - memcached_exporter-{{ memcached_exporter_version }}.{{ ansible_system | lower }}-{{ _memcached_exporter_go_ansible_arch }}.tar.gz" + memcached_exporter-{{ memcached_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _memcached_exporter_go_ansible_arch }}.tar.gz" memcached_exporter_checksums_url: "https://github.com/{{ _memcached_exporter_repo }}/releases/download/v{{ memcached_exporter_version }}/sha256sums.txt" memcached_exporter_memcached_pid_file: "" @@ -23,6 +23,6 @@ memcached_exporter_system_user: "memcached-exp" memcached_exporter_system_group: "{{ memcached_exporter_system_user }}" # Local path to stash the archive and its extraction -memcached_exporter_local_cache_path: "/tmp/memcached_exporter-{{ ansible_system | lower }}-{{ _memcached_exporter_go_ansible_arch }}/\ +memcached_exporter_local_cache_path: "/tmp/memcached_exporter-{{ ansible_facts['system'] | lower }}-{{ _memcached_exporter_go_ansible_arch }}/\ {{ memcached_exporter_version }}" memcached_exporter_config_dir: "/etc/memcached_exporter" diff --git a/roles/memcached_exporter/meta/argument_specs.yml b/roles/memcached_exporter/meta/argument_specs.yml index 4b7f48ac8..b1b1e3fa2 100644 --- a/roles/memcached_exporter/meta/argument_specs.yml +++ b/roles/memcached_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.15.0" memcached_exporter_binary_url: description: "URL of the memcached_exporter binaries .tar.gz file" - default: "https://github.com/{{ _memcached_exporter_repo }}/releases/download/v{{ memcached_exporter_version }}/memcached_exporter-{{ memcached_exporter_version }}.{{ ansible_system | lower }}-{{ _memcached_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _memcached_exporter_repo }}/releases/download/v{{ memcached_exporter_version }}/memcached_exporter-{{ memcached_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _memcached_exporter_go_ansible_arch }}.tar.gz" memcached_exporter_checksums_url: description: "URL of the memcached_exporter checksums file" default: "https://github.com/{{ _memcached_exporter_repo }}/releases/download/v{{ memcached_exporter_version }}/sha256sums.txt" @@ -67,7 +67,7 @@ argument_specs: default: "memcached-exp" memcached_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/memcached_exporter-{{ ansible_system | lower }}-{{ _memcached_exporter_go_ansible_arch }}/{{ memcached_exporter_version }}" + default: "/tmp/memcached_exporter-{{ ansible_facts['system'] | lower }}-{{ _memcached_exporter_go_ansible_arch }}/{{ memcached_exporter_version }}" memcached_exporter_config_dir: description: "Path to directory with memcached_exporter configuration" default: "/etc/memcached_exporter" diff --git a/roles/memcached_exporter/tasks/main.yml b/roles/memcached_exporter/tasks/main.yml index d1224069d..c58ed31f2 100644 --- a/roles/memcached_exporter/tasks/main.yml +++ b/roles/memcached_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ memcached_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - memcached_exporter_configure diff --git a/roles/memcached_exporter/vars/main.yml b/roles/memcached_exporter/vars/main.yml index f60c91828..6aef59be2 100644 --- a/roles/memcached_exporter/vars/main.yml +++ b/roles/memcached_exporter/vars/main.yml @@ -3,7 +3,7 @@ _memcached_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _memcached_exporter_repo: "prometheus/memcached_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _memcached_exporter_binaries: ['memcached_exporter'] diff --git a/roles/mongodb_exporter/defaults/main.yml b/roles/mongodb_exporter/defaults/main.yml index 4dcc02a07..0f610a40d 100644 --- a/roles/mongodb_exporter/defaults/main.yml +++ b/roles/mongodb_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- mongodb_exporter_version: 0.42.0 mongodb_exporter_binary_url: "https://github.com/{{ _mongodb_exporter_repo }}/releases/download/v{{ mongodb_exporter_version }}/\ - mongodb_exporter-{{ mongodb_exporter_version }}.{{ ansible_system | lower }}-{{ _mongodb_exporter_go_ansible_arch }}.tar.gz" + mongodb_exporter-{{ mongodb_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _mongodb_exporter_go_ansible_arch }}.tar.gz" mongodb_exporter_checksums_url: "https://github.com/{{ _mongodb_exporter_repo }}/releases/download/v{{ mongodb_exporter_version }}/\ mongodb_exporter_{{ mongodb_exporter_version }}_checksums.txt" @@ -34,4 +34,4 @@ mongodb_exporter_system_group: "{{ mongodb_exporter_system_user }}" mongodb_exporter_config_dir: "/etc/mongodb_exporter" # Local path to stash the archive and its extraction -mongodb_exporter_local_cache_path: "/tmp/mongodb_exporter-{{ ansible_system | lower }}-{{ _mongodb_exporter_go_ansible_arch }}/{{ mongodb_exporter_version }}" +mongodb_exporter_local_cache_path: "/tmp/mongodb_exporter-{{ ansible_facts['system'] | lower }}-{{ _mongodb_exporter_go_ansible_arch }}/{{ mongodb_exporter_version }}" diff --git a/roles/mongodb_exporter/meta/argument_specs.yml b/roles/mongodb_exporter/meta/argument_specs.yml index e9a487699..5bec3729a 100644 --- a/roles/mongodb_exporter/meta/argument_specs.yml +++ b/roles/mongodb_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.42.0" mongodb_exporter_binary_url: description: "URL of the mongodb_exporter binaries .tar.gz file" - default: "https://github.com/{{ _mongodb_exporter_repo }}/releases/download/v{{ mongodb_exporter_version }}/mongodb_exporter-{{ mongodb_exporter_version }}.{{ ansible_system | lower }}-{{ _mongodb_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _mongodb_exporter_repo }}/releases/download/v{{ mongodb_exporter_version }}/mongodb_exporter-{{ mongodb_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _mongodb_exporter_go_ansible_arch }}.tar.gz" mongodb_exporter_checksums_url: description: "URL of the mongodb_exporter checksums file" default: "https://github.com/{{ _mongodb_exporter_repo }}/releases/download/v{{ mongodb_exporter_version }}/mongodb_exporter_{{ mongodb_exporter_version }}_checksums.txt" @@ -111,4 +111,4 @@ argument_specs: default: "mongodb-exp" mongodb_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/mongodb_exporter-{{ ansible_system | lower }}-{{ _mongodb_exporter_go_ansible_arch }}/{{ mongodb_exporter_version }}" + default: "/tmp/mongodb_exporter-{{ ansible_facts['system'] | lower }}-{{ _mongodb_exporter_go_ansible_arch }}/{{ mongodb_exporter_version }}" diff --git a/roles/mongodb_exporter/tasks/main.yml b/roles/mongodb_exporter/tasks/main.yml index b07a81e15..0cc1e98c6 100644 --- a/roles/mongodb_exporter/tasks/main.yml +++ b/roles/mongodb_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ mongodb_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - mongodb_exporter_configure diff --git a/roles/mongodb_exporter/vars/main.yml b/roles/mongodb_exporter/vars/main.yml index 41781cecd..8e996068b 100644 --- a/roles/mongodb_exporter/vars/main.yml +++ b/roles/mongodb_exporter/vars/main.yml @@ -3,7 +3,7 @@ _mongodb_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _mongodb_exporter_repo: "percona/mongodb_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _mongodb_exporter_binaries: ['mongodb_exporter'] diff --git a/roles/nginx_exporter/defaults/main.yml b/roles/nginx_exporter/defaults/main.yml index 42ba9de1b..effb950f9 100644 --- a/roles/nginx_exporter/defaults/main.yml +++ b/roles/nginx_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- nginx_exporter_version: 1.3.0 nginx_exporter_binary_url: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/\ - nginx-prometheus-exporter_{{ nginx_exporter_version }}_{{ ansible_system | lower }}_{{ _nginx_exporter_go_ansible_arch }}.tar.gz" + nginx-prometheus-exporter_{{ nginx_exporter_version }}_{{ ansible_facts['system'] | lower }}_{{ _nginx_exporter_go_ansible_arch }}.tar.gz" nginx_exporter_checksums_url: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/\ nginx-prometheus-exporter_{{ nginx_exporter_version }}_checksums.txt" nginx_exporter_plus: false @@ -25,4 +25,4 @@ nginx_exporter_system_user: "{{ nginx_exporter_system_group }}" nginx_exporter_config_dir: "/etc/nginx_exporter" # Local path to stash the archive and its extraction -nginx_exporter_local_cache_path: "/tmp/nginx_exporter-{{ ansible_system | lower }}-{{ _nginx_exporter_go_ansible_arch }}/{{ nginx_exporter_version }}" +nginx_exporter_local_cache_path: "/tmp/nginx_exporter-{{ ansible_facts['system'] | lower }}-{{ _nginx_exporter_go_ansible_arch }}/{{ nginx_exporter_version }}" diff --git a/roles/nginx_exporter/meta/argument_specs.yml b/roles/nginx_exporter/meta/argument_specs.yml index 5004be07f..9a1aad004 100644 --- a/roles/nginx_exporter/meta/argument_specs.yml +++ b/roles/nginx_exporter/meta/argument_specs.yml @@ -17,7 +17,7 @@ argument_specs: default: false nginx_exporter_binary_url: description: "URL of the nginx_exporter binaries .tar.gz file" - default: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_{{ ansible_system | lower }}_{{ _nginx_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_{{ ansible_facts['system'] | lower }}_{{ _nginx_exporter_go_ansible_arch }}.tar.gz" nginx_exporter_checksums_url: description: "URL of the nginx_exporter checksums file" default: "https://github.com/{{ _nginx_exporter_repo }}/releases/download/v{{ nginx_exporter_version }}/nginx-prometheus-exporter_{{ nginx_exporter_version }}_checksums.txt" @@ -66,7 +66,7 @@ argument_specs: default: "nginx-exp" nginx_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/nginx_exporter-{{ ansible_system | lower }}-{{ _nginx_exporter_go_ansible_arch }}/{{ nginx_exporter_version }}" + default: "/tmp/nginx_exporter-{{ ansible_facts['system'] | lower }}-{{ _nginx_exporter_go_ansible_arch }}/{{ nginx_exporter_version }}" nginx_exporter_config_dir: description: "Path to directory with nginx_exporter configuration" default: "/etc/nginx_exporter" diff --git a/roles/nginx_exporter/tasks/main.yml b/roles/nginx_exporter/tasks/main.yml index 1f584ba1d..a4b4b14a5 100644 --- a/roles/nginx_exporter/tasks/main.yml +++ b/roles/nginx_exporter/tasks/main.yml @@ -29,7 +29,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ nginx_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - nginx_exporter_configure diff --git a/roles/nginx_exporter/vars/main.yml b/roles/nginx_exporter/vars/main.yml index ad678876c..fb8aef546 100644 --- a/roles/nginx_exporter/vars/main.yml +++ b/roles/nginx_exporter/vars/main.yml @@ -3,7 +3,7 @@ _nginx_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _nginx_exporter_repo: "nginxinc/nginx-prometheus-exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _nginx_exporter_binaries: ['nginx-prometheus-exporter'] diff --git a/roles/nvidia_gpu_exporter/defaults/main.yml b/roles/nvidia_gpu_exporter/defaults/main.yml index f0fac8b0c..7adbe9666 100644 --- a/roles/nvidia_gpu_exporter/defaults/main.yml +++ b/roles/nvidia_gpu_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- nvidia_gpu_exporter_version: 1.2.1 nvidia_gpu_exporter_binary_url: "https://github.com/{{ _nvidia_gpu_exporter_repo }}/releases/download/v{{ nvidia_gpu_exporter_version }}/\ - nvidia_gpu_exporter_{{ nvidia_gpu_exporter_version }}_{{ ansible_system | lower }}_{{ _nvidia_gpu_exporter_go_ansible_arch }}.tar.gz" + nvidia_gpu_exporter_{{ nvidia_gpu_exporter_version }}_{{ ansible_facts['system'] | lower }}_{{ _nvidia_gpu_exporter_go_ansible_arch }}.tar.gz" nvidia_gpu_exporter_checksums_url: "https://github.com/{{ _nvidia_gpu_exporter_repo }}/releases/download/v{{ nvidia_gpu_exporter_version }}/checksums.txt" nvidia_gpu_exporter_web_listen_address: "0.0.0.0:9835" @@ -13,4 +13,4 @@ nvidia_gpu_exporter_system_user: "{{ nvidia_gpu_exporter_system_group }}" nvidia_gpu_exporter_config_dir: "/etc/nvidia_gpu_exporter" # Local path to stash the archive and its extraction -nvidia_gpu_exporter_local_cache_path: "/tmp/nvidia_gpu_exporter-{{ ansible_system | lower }}-{{ _nvidia_gpu_exporter_go_ansible_arch }}/{{ nvidia_gpu_exporter_version }}" +nvidia_gpu_exporter_local_cache_path: "/tmp/nvidia_gpu_exporter-{{ ansible_facts['system'] | lower }}-{{ _nvidia_gpu_exporter_go_ansible_arch }}/{{ nvidia_gpu_exporter_version }}" diff --git a/roles/nvidia_gpu_exporter/meta/argument_specs.yml b/roles/nvidia_gpu_exporter/meta/argument_specs.yml index 96836663a..6d2ed2820 100644 --- a/roles/nvidia_gpu_exporter/meta/argument_specs.yml +++ b/roles/nvidia_gpu_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "1.2.1" nvidia_gpu_exporter_binary_url: description: "URL of the Nvidia GPU exporter binaries .tar.gz file" - default: "https://github.com/{{ _nvidia_gpu_exporter_repo }}/releases/download/v{{ nvidia_gpu_exporter_version }}/nvidia_gpu_exporter_{{ nvidia_gpu_exporter_version }}_{{ ansible_system | lower }}_{{ _nvidia_gpu_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _nvidia_gpu_exporter_repo }}/releases/download/v{{ nvidia_gpu_exporter_version }}/nvidia_gpu_exporter_{{ nvidia_gpu_exporter_version }}_{{ ansible_facts['system'] | lower }}_{{ _nvidia_gpu_exporter_go_ansible_arch }}.tar.gz" nvidia_gpu_exporter_checksums_url: description: "URL of the Nvidia GPU exporter checksums file" default: "https://github.com/{{ _nvidia_gpu_exporter_repo }}/releases/download/v{{ nvidia_gpu_exporter_version }}/sha256sums.txt" @@ -40,7 +40,7 @@ argument_specs: default: "nvidia-gpu-exp" nvidia_gpu_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/nvidia_gpu_exporter-{{ ansible_system | lower }}-{{ _nvidia_gpu_exporter_go_ansible_arch }}/{{ nvidia_gpu_exporter_version }}" + default: "/tmp/nvidia_gpu_exporter-{{ ansible_facts['system'] | lower }}-{{ _nvidia_gpu_exporter_go_ansible_arch }}/{{ nvidia_gpu_exporter_version }}" nvidia_gpu_exporter_config_dir: description: "Path to directory with nvidia_gpu_exporter configuration" default: "/etc/nvidia_gpu_exporter" diff --git a/roles/nvidia_gpu_exporter/tasks/main.yml b/roles/nvidia_gpu_exporter/tasks/main.yml index d3d5d3299..10be0c8ea 100644 --- a/roles/nvidia_gpu_exporter/tasks/main.yml +++ b/roles/nvidia_gpu_exporter/tasks/main.yml @@ -35,7 +35,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ nvidia_gpu_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - nvidia_gpu_exporter - configure diff --git a/roles/nvidia_gpu_exporter/templates/nvidia_gpu_exporter.service.j2 b/roles/nvidia_gpu_exporter/templates/nvidia_gpu_exporter.service.j2 index ce9c1edf5..ff5d3891b 100644 --- a/roles/nvidia_gpu_exporter/templates/nvidia_gpu_exporter.service.j2 +++ b/roles/nvidia_gpu_exporter/templates/nvidia_gpu_exporter.service.j2 @@ -26,7 +26,7 @@ RestartSec=1 StartLimitInterval=0 {% set ns = namespace(protect_home = 'yes') %} -{% for m in ansible_mounts if m.mount.startswith('/home') %} +{% for m in ansible_facts['mounts'] if m.mount.startswith('/home') %} {% set ns.protect_home = 'read-only' %} {% endfor %} ProtectHome={{ ns.protect_home }} diff --git a/roles/nvidia_gpu_exporter/vars/main.yml b/roles/nvidia_gpu_exporter/vars/main.yml index 62fedb2d0..03e54ffa8 100644 --- a/roles/nvidia_gpu_exporter/vars/main.yml +++ b/roles/nvidia_gpu_exporter/vars/main.yml @@ -3,7 +3,7 @@ _nvidia_gpu_exporter_go_ansible_arch: "{{ {'i386': 'i386', 'x86_64': 'x86_64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _nvidia_gpu_exporter_repo: "utkuozdemir/nvidia_gpu_exporter" _nvidia_gpu_exporter_github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _nvidia_gpu_exporter_binaries: ['nvidia_gpu_exporter'] diff --git a/roles/postgres_exporter/defaults/main.yml b/roles/postgres_exporter/defaults/main.yml index 769274677..0028fa798 100644 --- a/roles/postgres_exporter/defaults/main.yml +++ b/roles/postgres_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- postgres_exporter_version: 0.16.0 postgres_exporter_binary_url: "https://github.com/{{ _postgres_exporter_repo }}/releases/download/v{{ postgres_exporter_version }}/\ - postgres_exporter-{{ postgres_exporter_version }}.{{ ansible_system | lower }}-{{ _postgres_exporter_go_ansible_arch }}.tar.gz" + postgres_exporter-{{ postgres_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _postgres_exporter_go_ansible_arch }}.tar.gz" postgres_exporter_checksums_url: "https://github.com/{{ _postgres_exporter_repo }}/releases/download/v{{ postgres_exporter_version }}/sha256sums.txt" postgres_exporter_web_listen_address: "0.0.0.0:9187" @@ -31,4 +31,4 @@ 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_local_cache_path: "/tmp/postgres_exporter-{{ ansible_system | lower }}-{{ _postgres_exporter_go_ansible_arch }}/{{ postgres_exporter_version }}" +postgres_exporter_local_cache_path: "/tmp/postgres_exporter-{{ ansible_facts['system'] | lower }}-{{ _postgres_exporter_go_ansible_arch }}/{{ postgres_exporter_version }}" diff --git a/roles/postgres_exporter/meta/argument_specs.yml b/roles/postgres_exporter/meta/argument_specs.yml index 70b64cb88..beba7af23 100644 --- a/roles/postgres_exporter/meta/argument_specs.yml +++ b/roles/postgres_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.16.0" postgres_exporter_binary_url: description: "URL of the postgres_exporter binaries .tar.gz file" - default: "https://github.com/{{ _postgres_exporter_repo }}/releases/download/v{{ postgres_exporter_version }}/postgres_exporter-{{ postgres_exporter_version }}.{{ ansible_system | lower }}-{{ _postgres_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _postgres_exporter_repo }}/releases/download/v{{ postgres_exporter_version }}/postgres_exporter-{{ postgres_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _postgres_exporter_go_ansible_arch }}.tar.gz" postgres_exporter_checksums_url: description: "URL of the postgres_exporter checksums file" default: "https://github.com/{{ _postgres_exporter_repo }}/releases/download/v{{ postgres_exporter_version }}/sha256sums.txt" @@ -82,4 +82,4 @@ argument_specs: default: "postgres-exp" postgres_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/postgres_exporter-{{ ansible_system | lower }}-{{ _postgres_exporter_go_ansible_arch }}/{{ postgres_exporter_version }}" + default: "/tmp/postgres_exporter-{{ ansible_facts['system'] | lower }}-{{ _postgres_exporter_go_ansible_arch }}/{{ postgres_exporter_version }}" diff --git a/roles/postgres_exporter/tasks/main.yml b/roles/postgres_exporter/tasks/main.yml index 315922711..0cd0a70f9 100644 --- a/roles/postgres_exporter/tasks/main.yml +++ b/roles/postgres_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ postgres_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - postgres_exporter_configure diff --git a/roles/postgres_exporter/templates/postgres_exporter.service.j2 b/roles/postgres_exporter/templates/postgres_exporter.service.j2 index 2b4bac66e..9fe1b2ba8 100644 --- a/roles/postgres_exporter/templates/postgres_exporter.service.j2 +++ b/roles/postgres_exporter/templates/postgres_exporter.service.j2 @@ -56,7 +56,7 @@ RestartSec=1 StartLimitInterval=0 {% set protect_home = 'yes' %} -{% for m in ansible_mounts if m.mount.startswith('/home') %} +{% for m in ansible_facts['mounts'] if m.mount.startswith('/home') %} {% set protect_home = 'read-only' %} {% endfor %} ProtectHome={{ protect_home }} diff --git a/roles/postgres_exporter/vars/main.yml b/roles/postgres_exporter/vars/main.yml index 3b3719e4f..714d74e65 100644 --- a/roles/postgres_exporter/vars/main.yml +++ b/roles/postgres_exporter/vars/main.yml @@ -3,7 +3,7 @@ _postgres_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _postgres_exporter_repo: "prometheus-community/postgres_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _postgres_exporter_binaries: ['postgres_exporter'] diff --git a/roles/process_exporter/defaults/main.yml b/roles/process_exporter/defaults/main.yml index cb0720a52..00a5841df 100644 --- a/roles/process_exporter/defaults/main.yml +++ b/roles/process_exporter/defaults/main.yml @@ -1,9 +1,9 @@ --- process_exporter_version: 0.8.4 process_exporter_binary_url: "https://github.com/{{ _process_exporter_repo }}/releases/download/v{{ process_exporter_version }}/\ - process-exporter-{{ process_exporter_version }}.{{ ansible_system | lower }}-{{ _process_exporter_go_ansible_arch }}.tar.gz" + process-exporter-{{ process_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _process_exporter_go_ansible_arch }}.tar.gz" process_exporter_checksums_url: "https://github.com/{{ _process_exporter_repo }}/releases/download/v{{ process_exporter_version }}/checksums.txt" -process_exporter_local_cache_path: "/tmp/process_exporter-{{ ansible_system | lower }}-{{ _process_exporter_go_ansible_arch }}/{{ process_exporter_version }}" +process_exporter_local_cache_path: "/tmp/process_exporter-{{ ansible_facts['system'] | lower }}-{{ _process_exporter_go_ansible_arch }}/{{ process_exporter_version }}" process_exporter_web_listen_address: "0.0.0.0:9256" diff --git a/roles/process_exporter/meta/argument_specs.yml b/roles/process_exporter/meta/argument_specs.yml index c20be96bf..a8754ad37 100644 --- a/roles/process_exporter/meta/argument_specs.yml +++ b/roles/process_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.8.4" process_exporter_binary_url: description: "URL of the Process exporter binaries .tar.gz file" - default: "https://github.com/{{ _process_exporter_repo }}/releases/download/v{{ process_exporter_version }}/process-exporter-{{ process_exporter_version }}.{{ ansible_system | lower }}-{{ _process_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _process_exporter_repo }}/releases/download/v{{ process_exporter_version }}/process-exporter-{{ process_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _process_exporter_go_ansible_arch }}.tar.gz" process_exporter_checksums_url: description: "URL of the Process exporter checksums file" default: "https://github.com/{{ _process_exporter_repo }}/releases/download/v{{ process_exporter_version }}/checksums.txt" @@ -57,7 +57,7 @@ argument_specs: default: "process-exp" process_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/process_exporter-{{ ansible_system | lower }}-{{ _process_exporter_go_ansible_arch }}/{{ process_exporter_version }}" + default: "/tmp/process_exporter-{{ ansible_facts['system'] | lower }}-{{ _process_exporter_go_ansible_arch }}/{{ process_exporter_version }}" process_exporter_config_dir: description: "Path to directory with process_exporter configuration" default: "/etc/process_exporter" diff --git a/roles/process_exporter/tasks/main.yml b/roles/process_exporter/tasks/main.yml index 71d0aa1ff..20678802e 100644 --- a/roles/process_exporter/tasks/main.yml +++ b/roles/process_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ process_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - process_exporter_configure diff --git a/roles/process_exporter/templates/process_exporter.service.j2 b/roles/process_exporter/templates/process_exporter.service.j2 index 179c881a5..7d889410d 100644 --- a/roles/process_exporter/templates/process_exporter.service.j2 +++ b/roles/process_exporter/templates/process_exporter.service.j2 @@ -24,7 +24,7 @@ RestartSec=1 StartLimitInterval=0 {% set ns = namespace(protect_home = 'yes') %} -{% for m in ansible_mounts if m.mount.startswith('/home') %} +{% for m in ansible_facts['mounts'] if m.mount.startswith('/home') %} {% set ns.protect_home = 'read-only' %} {% endfor %} ProtectHome={{ ns.protect_home }} diff --git a/roles/process_exporter/vars/main.yml b/roles/process_exporter/vars/main.yml index 6b5e20aca..daf9bc5cf 100644 --- a/roles/process_exporter/vars/main.yml +++ b/roles/process_exporter/vars/main.yml @@ -3,7 +3,7 @@ _process_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _process_exporter_repo: "ncabatoff/process-exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _process_exporter_binaries: ['process-exporter'] diff --git a/roles/pushgateway/defaults/main.yml b/roles/pushgateway/defaults/main.yml index 745741320..805eebe54 100644 --- a/roles/pushgateway/defaults/main.yml +++ b/roles/pushgateway/defaults/main.yml @@ -1,7 +1,7 @@ --- pushgateway_version: 1.10.0 pushgateway_binary_url: "https://github.com/{{ _pushgateway_repo }}/releases/download/v{{ pushgateway_version }}/\ - pushgateway-{{ pushgateway_version }}.{{ ansible_system | lower }}-{{ _pushgateway_go_ansible_arch }}.tar.gz" + pushgateway-{{ pushgateway_version }}.{{ ansible_facts['system'] | lower }}-{{ _pushgateway_go_ansible_arch }}.tar.gz" pushgateway_checksums_url: "https://github.com/{{ _pushgateway_repo }}/releases/download/v{{ pushgateway_version }}/sha256sums.txt" pushgateway_web_listen_address: "0.0.0.0:9091" @@ -19,4 +19,4 @@ pushgateway_system_user: "{{ pushgateway_system_group }}" pushgateway_config_dir: "/etc/pushgateway" # Local path to stash the archive and its extraction -pushgateway_local_cache_path: "/tmp/pushgateway-{{ ansible_system | lower }}-{{ _pushgateway_go_ansible_arch }}/{{ pushgateway_version }}" +pushgateway_local_cache_path: "/tmp/pushgateway-{{ ansible_facts['system'] | lower }}-{{ _pushgateway_go_ansible_arch }}/{{ pushgateway_version }}" diff --git a/roles/pushgateway/meta/argument_specs.yml b/roles/pushgateway/meta/argument_specs.yml index 7b40c7a58..1077f0518 100644 --- a/roles/pushgateway/meta/argument_specs.yml +++ b/roles/pushgateway/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "1.10.0" pushgateway_binary_url: description: "URL of the Pushgateway binaries .tar.gz file" - default: "https://github.com/{{ _pushgateway_repo }}/releases/download/v{{ pushgateway_version }}/pushgateway-{{ pushgateway_version }}.{{ ansible_system | lower }}-{{ _pushgateway_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _pushgateway_repo }}/releases/download/v{{ pushgateway_version }}/pushgateway-{{ pushgateway_version }}.{{ ansible_facts['system'] | lower }}-{{ _pushgateway_go_ansible_arch }}.tar.gz" pushgateway_checksums_url: description: "URL of the Pushgateway checksums file" default: "https://github.com/{{ _pushgateway_repo }}/releases/download/v{{ pushgateway_version }}/sha256sums.txt" @@ -53,7 +53,7 @@ argument_specs: default: "pushgateway" pushgateway_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/pushgateway-{{ ansible_system | lower }}-{{ _pushgateway_go_ansible_arch }}/{{ pushgateway_version }}" + default: "/tmp/pushgateway-{{ ansible_facts['system'] | lower }}-{{ _pushgateway_go_ansible_arch }}/{{ pushgateway_version }}" pushgateway_config_dir: description: "Path to directory with pushgateway configuration" default: "/etc/pushgateway" diff --git a/roles/pushgateway/tasks/main.yml b/roles/pushgateway/tasks/main.yml index 54a3f214f..070d07da0 100644 --- a/roles/pushgateway/tasks/main.yml +++ b/roles/pushgateway/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ pushgateway_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - pushgateway_configure diff --git a/roles/pushgateway/templates/pushgateway.service.j2 b/roles/pushgateway/templates/pushgateway.service.j2 index b6a5622e3..9db1333b4 100644 --- a/roles/pushgateway/templates/pushgateway.service.j2 +++ b/roles/pushgateway/templates/pushgateway.service.j2 @@ -34,7 +34,7 @@ RestartSec=1 StartLimitInterval=0 {% set ns = namespace(protect_home = 'yes') %} -{% for m in ansible_mounts if m.mount.startswith('/home') %} +{% for m in ansible_facts['mounts'] if m.mount.startswith('/home') %} {% set ns.protect_home = 'read-only' %} {% endfor %} ProtectHome={{ ns.protect_home }} diff --git a/roles/pushgateway/vars/main.yml b/roles/pushgateway/vars/main.yml index 511e95037..1e40409da 100644 --- a/roles/pushgateway/vars/main.yml +++ b/roles/pushgateway/vars/main.yml @@ -3,7 +3,7 @@ _pushgateway_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _pushgateway_repo: "prometheus/pushgateway" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _pushgateway_binaries: ['pushgateway'] diff --git a/roles/redis_exporter/defaults/main.yml b/roles/redis_exporter/defaults/main.yml index 4570d6862..1bf7b9ec7 100644 --- a/roles/redis_exporter/defaults/main.yml +++ b/roles/redis_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- redis_exporter_version: 1.66.0 redis_exporter_binary_url: "https://github.com/{{ _redis_exporter_repo }}/releases/download/v{{ redis_exporter_version }}/\ - redis_exporter-v{{ redis_exporter_version }}.{{ ansible_system | lower }}-{{ _redis_exporter_go_ansible_arch }}.tar.gz" + redis_exporter-v{{ redis_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _redis_exporter_go_ansible_arch }}.tar.gz" redis_exporter_checksums_url: "https://github.com/{{ _redis_exporter_repo }}/releases/download/v{{ redis_exporter_version }}/sha256sums.txt" # https://github.com/oliver006/redis_exporter?tab=readme-ov-file#command-line-flags @@ -50,4 +50,4 @@ redis_exporter_system_user: "{{ redis_exporter_system_group }}" redis_exporter_config_dir: "/etc/redis_exporter" # Local path to stash the archive and its extraction -redis_exporter_local_cache_path: "/tmp/redis_exporter-{{ ansible_system | lower }}-{{ _redis_exporter_go_ansible_arch }}/{{ redis_exporter_version }}" +redis_exporter_local_cache_path: "/tmp/redis_exporter-{{ ansible_facts['system'] | lower }}-{{ _redis_exporter_go_ansible_arch }}/{{ redis_exporter_version }}" diff --git a/roles/redis_exporter/meta/argument_specs.yml b/roles/redis_exporter/meta/argument_specs.yml index 9b21740a1..3ae367e9c 100644 --- a/roles/redis_exporter/meta/argument_specs.yml +++ b/roles/redis_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "1.66.0" redis_exporter_binary_url: description: "URL of the redis_exporter binaries .tar.gz file" - default: "https://github.com/{{ _redis_exporter_repo }}/releases/download/v{{ redis_exporter_version }}/redis_exporter-v{{ redis_exporter_version }}.{{ ansible_system | lower }}-{{ _redis_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _redis_exporter_repo }}/releases/download/v{{ redis_exporter_version }}/redis_exporter-v{{ redis_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _redis_exporter_go_ansible_arch }}.tar.gz" redis_exporter_checksums_url: description: "URL of the redis_exporter checksums file" default: "https://github.com/{{ _redis_exporter_repo }}/releases/download/v{{ redis_exporter_version }}/sha256sums.txt" @@ -172,7 +172,7 @@ argument_specs: default: "redis-exp" redis_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/redis_exporter-{{ ansible_system | lower }}-{{ _redis_exporter_go_ansible_arch }}/{{ redis_exporter_version }}" + default: "/tmp/redis_exporter-{{ ansible_facts['system'] | lower }}-{{ _redis_exporter_go_ansible_arch }}/{{ redis_exporter_version }}" redis_exporter_config_dir: description: "Path to directory with redis_exporter configuration" default: "/etc/redis_exporter" diff --git a/roles/redis_exporter/tasks/main.yml b/roles/redis_exporter/tasks/main.yml index 357ba91d7..1229969c5 100644 --- a/roles/redis_exporter/tasks/main.yml +++ b/roles/redis_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ redis_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - redis_exporter_configure diff --git a/roles/redis_exporter/vars/main.yml b/roles/redis_exporter/vars/main.yml index 3b61006e8..75724eaf7 100644 --- a/roles/redis_exporter/vars/main.yml +++ b/roles/redis_exporter/vars/main.yml @@ -3,7 +3,7 @@ _redis_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _redis_exporter_repo: "oliver006/redis_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _redis_exporter_binaries: ['redis_exporter'] diff --git a/roles/smartctl_exporter/defaults/main.yml b/roles/smartctl_exporter/defaults/main.yml index 518e8af8f..1daa7b2dc 100644 --- a/roles/smartctl_exporter/defaults/main.yml +++ b/roles/smartctl_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- smartctl_exporter_version: 0.12.0 smartctl_exporter_binary_url: "https://github.com/{{ _smartctl_exporter_repo }}/releases/download/v{{ smartctl_exporter_version }}/\ - smartctl_exporter-{{ smartctl_exporter_version }}.{{ ansible_system | lower }}-{{ _smartctl_exporter_go_ansible_arch }}.tar.gz" + smartctl_exporter-{{ smartctl_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _smartctl_exporter_go_ansible_arch }}.tar.gz" smartctl_exporter_checksums_url: "https://github.com/{{ _smartctl_exporter_repo }}/releases/download/v{{ smartctl_exporter_version }}/sha256sums.txt" smartctl_exporter_smartctl_path: "/usr/sbin/smartctl" @@ -29,4 +29,4 @@ smartctl_exporter_system_user: "{{ smartctl_exporter_system_group }}" smartctl_exporter_config_dir: "/etc/smartctl_exporter" # Local path to stash the archive and its extraction -smartctl_exporter_local_cache_path: "/tmp/smartctl_exporter-{{ ansible_system | lower }}-{{ _smartctl_exporter_go_ansible_arch }}/{{ smartctl_exporter_version }}" +smartctl_exporter_local_cache_path: "/tmp/smartctl_exporter-{{ ansible_facts['system'] | lower }}-{{ _smartctl_exporter_go_ansible_arch }}/{{ smartctl_exporter_version }}" diff --git a/roles/smartctl_exporter/meta/argument_specs.yml b/roles/smartctl_exporter/meta/argument_specs.yml index dc735a35c..6ed3323a1 100644 --- a/roles/smartctl_exporter/meta/argument_specs.yml +++ b/roles/smartctl_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.12.0" smartctl_exporter_binary_url: description: "URL of the Smartctl exporter binaries .tar.gz file" - default: "https://github.com/{{ _smartctl_exporter_repo }}/releases/download/v{{ smartctl_exporter_version }}/smartctl_exporter-{{ smartctl_exporter_version }}.{{ ansible_system | lower }}-{{ _smartctl_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _smartctl_exporter_repo }}/releases/download/v{{ smartctl_exporter_version }}/smartctl_exporter-{{ smartctl_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _smartctl_exporter_go_ansible_arch }}.tar.gz" smartctl_exporter_checksums_url: description: "URL of the Smartctl exporter checksums file" default: "https://github.com/{{ _smartctl_exporter_repo }}/releases/download/v{{ smartctl_exporter_version }}/sha256sums.txt" @@ -83,7 +83,7 @@ argument_specs: default: "smartctl-exp" smartctl_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/smartctl_exporter-{{ ansible_system | lower }}-{{ _smartctl_exporter_go_ansible_arch }}/{{ smartctl_exporter_version }}" + default: "/tmp/smartctl_exporter-{{ ansible_facts['system'] | lower }}-{{ _smartctl_exporter_go_ansible_arch }}/{{ smartctl_exporter_version }}" smartctl_exporter_config_dir: description: "Path to directory with smartctl_exporter configuration" default: "/etc/smartctl_exporter" diff --git a/roles/smartctl_exporter/tasks/main.yml b/roles/smartctl_exporter/tasks/main.yml index 9eb305664..c30e8f996 100644 --- a/roles/smartctl_exporter/tasks/main.yml +++ b/roles/smartctl_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ smartctl_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - smartctl_exporter_configure diff --git a/roles/smartctl_exporter/vars/main.yml b/roles/smartctl_exporter/vars/main.yml index 79ccf2269..7dd0a8398 100644 --- a/roles/smartctl_exporter/vars/main.yml +++ b/roles/smartctl_exporter/vars/main.yml @@ -3,7 +3,7 @@ _smartctl_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _smartctl_exporter_repo: "prometheus-community/smartctl_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _smartctl_exporter_binaries: ['smartctl_exporter'] diff --git a/roles/smokeping_prober/defaults/main.yml b/roles/smokeping_prober/defaults/main.yml index 6d5ee50c0..41739685e 100644 --- a/roles/smokeping_prober/defaults/main.yml +++ b/roles/smokeping_prober/defaults/main.yml @@ -1,7 +1,7 @@ --- smokeping_prober_version: 0.8.1 smokeping_prober_binary_url: "https://github.com/{{ _smokeping_prober_repo }}/releases/download/v{{ smokeping_prober_version }}/\ - smokeping_prober-{{ smokeping_prober_version }}.{{ ansible_system | lower }}-{{ _smokeping_prober_go_ansible_arch }}.tar.gz" + smokeping_prober-{{ smokeping_prober_version }}.{{ ansible_facts['system'] | lower }}-{{ _smokeping_prober_go_ansible_arch }}.tar.gz" smokeping_prober_checksums_url: "https://github.com/{{ _smokeping_prober_repo }}/releases/download/v{{ smokeping_prober_version }}/sha256sums.txt" smokeping_prober_web_listen_address: "0.0.0.0:9374" @@ -32,4 +32,4 @@ smokeping_prober_system_group: "smokeping" smokeping_prober_system_user: "{{ smokeping_prober_system_group }}" # Local path to stash the archive and its extraction -smokeping_prober_local_cache_path: "/tmp/smokeping_prober-{{ ansible_system | lower }}-{{ _smokeping_prober_go_ansible_arch }}/{{ smokeping_prober_version }}" +smokeping_prober_local_cache_path: "/tmp/smokeping_prober-{{ ansible_facts['system'] | lower }}-{{ _smokeping_prober_go_ansible_arch }}/{{ smokeping_prober_version }}" diff --git a/roles/smokeping_prober/meta/argument_specs.yml b/roles/smokeping_prober/meta/argument_specs.yml index b0de9b341..5a4a8187c 100644 --- a/roles/smokeping_prober/meta/argument_specs.yml +++ b/roles/smokeping_prober/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.8.1" smokeping_prober_binary_url: description: "URL of the Smokeping Prober binaries .tar.gz file" - default: "https://github.com/{{ _smokeping_prober_repo }}/releases/download/v{{ smokeping_prober_version }}/smokeping_prober-{{ smokeping_prober_version }}.{{ ansible_system | lower }}-{{ _smokeping_prober_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _smokeping_prober_repo }}/releases/download/v{{ smokeping_prober_version }}/smokeping_prober-{{ smokeping_prober_version }}.{{ ansible_facts['system'] | lower }}-{{ _smokeping_prober_go_ansible_arch }}.tar.gz" smokeping_prober_checksums_url: description: "URL of the Smokeping Prober checksums file" default: "https://github.com/{{ _smokeping_prober_repo }}/releases/download/v{{ smokeping_prober_version }}/sha256sums.txt" @@ -59,4 +59,4 @@ argument_specs: default: "smokeping" smokeping_prober_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/smokeping_prober-{{ ansible_system | lower }}-{{ _smokeping_prober_go_ansible_arch }}/{{ smokeping_prober_version }}" + default: "/tmp/smokeping_prober-{{ ansible_facts['system'] | lower }}-{{ _smokeping_prober_go_ansible_arch }}/{{ smokeping_prober_version }}" diff --git a/roles/smokeping_prober/tasks/main.yml b/roles/smokeping_prober/tasks/main.yml index e2f118446..d0af0e011 100644 --- a/roles/smokeping_prober/tasks/main.yml +++ b/roles/smokeping_prober/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ smokeping_prober_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - smokeping_prober_configure diff --git a/roles/smokeping_prober/vars/main.yml b/roles/smokeping_prober/vars/main.yml index a432411ce..3bdbf6ea0 100644 --- a/roles/smokeping_prober/vars/main.yml +++ b/roles/smokeping_prober/vars/main.yml @@ -3,7 +3,7 @@ _smokeping_prober_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _smokeping_prober_repo: "superq/smokeping_prober" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _smokeping_prober_binaries: ['smokeping_prober'] diff --git a/roles/snmp_exporter/defaults/main.yml b/roles/snmp_exporter/defaults/main.yml index 796cbb9fb..cf26c661e 100644 --- a/roles/snmp_exporter/defaults/main.yml +++ b/roles/snmp_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- snmp_exporter_version: 0.26.0 snmp_exporter_binary_url: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/\ - snmp_exporter-{{ snmp_exporter_version }}.{{ ansible_system | lower }}-{{ _snmp_exporter_go_ansible_arch }}.tar.gz" + snmp_exporter-{{ snmp_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _snmp_exporter_go_ansible_arch }}.tar.gz" snmp_exporter_checksums_url: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/sha256sums.txt" snmp_exporter_web_listen_address: "0.0.0.0:9116" snmp_exporter_log_level: info @@ -13,6 +13,6 @@ snmp_exporter_binary_install_dir: "/usr/local/bin" snmp_exporter_config_dir: "/etc/snmp_exporter" # Local path to stash the archive and its extraction -snmp_exporter_local_cache_path: "/tmp/snmp_exporter-{{ ansible_system | lower }}-{{ _snmp_exporter_go_ansible_arch }}/{{ snmp_exporter_version }}" +snmp_exporter_local_cache_path: "/tmp/snmp_exporter-{{ ansible_facts['system'] | lower }}-{{ _snmp_exporter_go_ansible_arch }}/{{ snmp_exporter_version }}" snmp_exporter_system_user: snmp-exp snmp_exporter_system_group: "{{ snmp_exporter_system_user }}" diff --git a/roles/snmp_exporter/meta/argument_specs.yml b/roles/snmp_exporter/meta/argument_specs.yml index 84ce318de..4297d6ad3 100644 --- a/roles/snmp_exporter/meta/argument_specs.yml +++ b/roles/snmp_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.26.0" snmp_exporter_binary_url: description: "URL of the snmp exporter binaries .tar.gz file" - default: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/snmp_exporter-{{ snmp_exporter_version }}.{{ ansible_system | lower }}-{{ _snmp_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/snmp_exporter-{{ snmp_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _snmp_exporter_go_ansible_arch }}.tar.gz" snmp_exporter_checksums_url: description: "URL of the snmp exporter checksums file" default: "https://github.com/{{ _snmp_exporter_repo }}/releases/download/v{{ snmp_exporter_version }}/sha256sums.txt" @@ -44,7 +44,7 @@ argument_specs: default: snmp-exp snmp_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/snmp_exporter-{{ ansible_system | lower }}-{{ _snmp_exporter_go_ansible_arch }}/{{ snmp_exporter_version }}" + default: "/tmp/snmp_exporter-{{ ansible_facts['system'] | lower }}-{{ _snmp_exporter_go_ansible_arch }}/{{ snmp_exporter_version }}" snmp_exporter_config_dir: description: "Path to directory with snmp_exporter configuration" default: "/etc/snmp_exporter" diff --git a/roles/snmp_exporter/tasks/main.yml b/roles/snmp_exporter/tasks/main.yml index 7ce6a5624..508354c0f 100644 --- a/roles/snmp_exporter/tasks/main.yml +++ b/roles/snmp_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ snmp_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - snmp_exporter_configure diff --git a/roles/snmp_exporter/vars/main.yml b/roles/snmp_exporter/vars/main.yml index 139d62a5d..963efce0c 100644 --- a/roles/snmp_exporter/vars/main.yml +++ b/roles/snmp_exporter/vars/main.yml @@ -3,7 +3,7 @@ _snmp_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _snmp_exporter_repo: "prometheus/snmp_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _snmp_exporter_binaries: ['snmp_exporter'] diff --git a/roles/systemd_exporter/defaults/main.yml b/roles/systemd_exporter/defaults/main.yml index c14fba5ca..51482389d 100644 --- a/roles/systemd_exporter/defaults/main.yml +++ b/roles/systemd_exporter/defaults/main.yml @@ -1,7 +1,7 @@ --- systemd_exporter_version: 0.6.0 systemd_exporter_binary_url: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/\ - systemd_exporter-{{ systemd_exporter_version }}.{{ ansible_system | lower }}-{{ _systemd_exporter_go_ansible_arch }}.tar.gz" + systemd_exporter-{{ systemd_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _systemd_exporter_go_ansible_arch }}.tar.gz" systemd_exporter_checksums_url: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/sha256sums.txt" systemd_exporter_web_listen_address: "0.0.0.0:9558" @@ -22,4 +22,4 @@ systemd_exporter_config_dir: "/etc/systemd_exporter" systemd_exporter_log_level: info # Local path to stash the archive and its extraction -systemd_exporter_local_cache_path: "/tmp/systemd_exporter-{{ ansible_system | lower }}-{{ _systemd_exporter_go_ansible_arch }}/{{ systemd_exporter_version }}" +systemd_exporter_local_cache_path: "/tmp/systemd_exporter-{{ ansible_facts['system'] | lower }}-{{ _systemd_exporter_go_ansible_arch }}/{{ systemd_exporter_version }}" diff --git a/roles/systemd_exporter/meta/argument_specs.yml b/roles/systemd_exporter/meta/argument_specs.yml index 3208219ed..3fa2aeedf 100644 --- a/roles/systemd_exporter/meta/argument_specs.yml +++ b/roles/systemd_exporter/meta/argument_specs.yml @@ -13,7 +13,7 @@ argument_specs: default: "0.6.0" systemd_exporter_binary_url: description: URL of the systemd exporter binaries .tar.gz file" - default: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/systemd_exporter-{{ systemd_exporter_version }}.{{ ansible_system | lower }}-{{ _systemd_exporter_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/systemd_exporter-{{ systemd_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _systemd_exporter_go_ansible_arch }}.tar.gz" systemd_exporter_checksums_url: description: "URL of the systemd exporter checksums file" default: "https://github.com/{{ _systemd_exporter_repo }}/releases/download/v{{ systemd_exporter_version }}/sha256sums.txt" @@ -60,7 +60,7 @@ argument_specs: description: Only log messages with the given severity or above. systemd_exporter_local_cache_path: description: "Local path to stash the archive and its extraction" - default: "/tmp/systemd_exporter-{{ ansible_system | lower }}-{{ _systemd_exporter_go_ansible_arch }}/{{ systemd_exporter_version }}" + default: "/tmp/systemd_exporter-{{ ansible_facts['system'] | lower }}-{{ _systemd_exporter_go_ansible_arch }}/{{ systemd_exporter_version }}" systemd_exporter_config_dir: description: "Path to directory with systemd_exporter configuration" default: "/etc/systemd_exporter" diff --git a/roles/systemd_exporter/tasks/main.yml b/roles/systemd_exporter/tasks/main.yml index faa7fe402..abf6b181a 100644 --- a/roles/systemd_exporter/tasks/main.yml +++ b/roles/systemd_exporter/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ systemd_exporter_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - systemd_exporter_configure diff --git a/roles/systemd_exporter/vars/main.yml b/roles/systemd_exporter/vars/main.yml index 966be4a00..04955205c 100644 --- a/roles/systemd_exporter/vars/main.yml +++ b/roles/systemd_exporter/vars/main.yml @@ -3,7 +3,7 @@ _systemd_exporter_go_ansible_arch: "{{ {'i386': '386', 'x86_64': 'amd64', 'aarch64': 'arm64', 'armv7l': 'armv7', - 'armv6l': 'armv6'}.get(ansible_architecture, ansible_architecture) }}" + 'armv6l': 'armv6'}.get(ansible_facts['architecture'], ansible_facts['architecture']) }}" _systemd_exporter_repo: "prometheus-community/systemd_exporter" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}" _systemd_exporter_binaries: ['systemd_exporter']