Skip to content

Commit 0a21d81

Browse files
committed
Change blackbox esporter dependencies to be stored as an array, not string
1 parent d4e93b3 commit 0a21d81

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

roles/blackbox_exporter/vars/main.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ _blackbox_exporter_go_ansible_arch: "{{ {'i386': '386',
77
_blackbox_exporter_repo: "prometheus/blackbox_exporter"
88
_github_api_headers: "{{ {'GITHUB_TOKEN': lookup('ansible.builtin.env', 'GITHUB_TOKEN')} if (lookup('ansible.builtin.env', 'GITHUB_TOKEN')) else {} }}"
99
_blackbox_exporter_binaries: ['blackbox_exporter']
10-
_blackbox_exporter_dependencies: "{% if (ansible_facts['pkg_mgr'] == 'apt') %}\
11-
{{ (['python-apt', 'libcap2-bin'] if ansible_facts['python_version'] is version('3', '<') else ['python3-apt', 'libcap2-bin']) }}
12-
{% else %}\
13-
{% endif %}"
10+
_blackbox_exporter_dependencies: >-
11+
{{ ['python-apt', 'libcap2-bin']
12+
if ansible_facts['pkg_mgr'] == 'apt' and ansible_facts['python_version'] is version('3', '<')
13+
else ['python3-apt', 'libcap2-bin'] if ansible_facts['pkg_mgr'] == 'apt'
14+
else [] }}

0 commit comments

Comments
 (0)