diff --git a/roles/prometheus/defaults/main.yml b/roles/prometheus/defaults/main.yml index e7d45ae76..71c3e7abb 100644 --- a/roles/prometheus/defaults/main.yml +++ b/roles/prometheus/defaults/main.yml @@ -1,7 +1,7 @@ --- prometheus_version: 3.0.0 prometheus_binary_url: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/\ - prometheus-{{ prometheus_version }}.{{ ansible_system | lower }}-{{ _prometheus_go_ansible_arch }}.tar.gz" + prometheus-{{ prometheus_version }}.{{ ansible_facts['system'] | lower }}-{{ _prometheus_go_ansible_arch }}.tar.gz" prometheus_checksums_url: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/sha256sums.txt" prometheus_binary_install_dir: /usr/local/bin @@ -237,4 +237,4 @@ prometheus_system_user: "{{ prometheus_system_group }}" prometheus_stop_timeout: '600s' # Local path to stash the archive and its extraction -prometheus_local_cache_path: "/tmp/prometheus-{{ ansible_system | lower }}-{{ _prometheus_go_ansible_arch }}/{{ prometheus_version }}" +prometheus_local_cache_path: "/tmp/prometheus-{{ ansible_facts['system'] | lower }}-{{ _prometheus_go_ansible_arch }}/{{ prometheus_version }}" diff --git a/roles/prometheus/meta/argument_specs.yml b/roles/prometheus/meta/argument_specs.yml index e9522e59e..790bc3acc 100644 --- a/roles/prometheus/meta/argument_specs.yml +++ b/roles/prometheus/meta/argument_specs.yml @@ -15,7 +15,7 @@ argument_specs: default: "3.0.0" prometheus_binary_url: description: "URL of the prometheus binaries .tar.gz file" - default: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/prometheus-{{ prometheus_version }}.{{ ansible_system | lower }}-{{ _prometheus_go_ansible_arch }}.tar.gz" + default: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/prometheus-{{ prometheus_version }}.{{ ansible_facts['system'] | lower }}-{{ _prometheus_go_ansible_arch }}.tar.gz" prometheus_checksums_url: description: URL of the prometheus checksums file default: "https://github.com/{{ _prometheus_repo }}/releases/download/v{{ prometheus_version }}/sha256sums.txt" @@ -173,4 +173,4 @@ argument_specs: default: "600s" prometheus_local_cache_path: description: Local path to stash the archive and its extraction - default: /tmp/prometheus-{{ ansible_system | lower }}-{{ _prometheus_go_ansible_arch }}/{{ prometheus_version }} + default: /tmp/prometheus-{{ ansible_facts['system'] | lower }}-{{ _prometheus_go_ansible_arch }}/{{ prometheus_version }} diff --git a/roles/prometheus/tasks/main.yml b/roles/prometheus/tasks/main.yml index bfe59310c..ead587c3b 100644 --- a/roles/prometheus/tasks/main.yml +++ b/roles/prometheus/tasks/main.yml @@ -30,7 +30,7 @@ tasks_from: selinux.yml vars: _common_selinux_port: "{{ prometheus_web_listen_address | urlsplit('port') }}" - when: ansible_selinux.status == "enabled" + when: ansible_facts['selinux'].status == "enabled" tags: - prometheus_configure diff --git a/roles/prometheus/vars/main.yml b/roles/prometheus/vars/main.yml index 8ae4feec0..f3a0d75e3 100644 --- a/roles/prometheus/vars/main.yml +++ b/roles/prometheus/vars/main.yml @@ -3,7 +3,7 @@ _prometheus_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']) }}" _prometheus_repo: "prometheus/prometheus" _github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}"