mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 03:43:09 +00:00
fix: Install package fact dependencies needs to be run as root
Signed-off-by: Jonathan Mabit <jonathan.mabit@dametis.com>
This commit is contained in:
parent
7aeb2ad55f
commit
7047669da7
6 changed files with 9 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
msg: "This module only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ _pkg_fact_req }}"
|
||||
state: present
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
msg: "This role only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ _pkg_fact_req }}"
|
||||
state: present
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
msg: "This role only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ _pkg_fact_req }}"
|
||||
state: present
|
||||
|
|
|
@ -5,15 +5,16 @@
|
|||
msg: "This role only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ _pkg_fact_req }}"
|
||||
state: present
|
||||
when: (_pkg_fact_req)
|
||||
vars:
|
||||
_pkg_fact_req: "{% if (ansible_pkg_mgr == 'apt') %}\
|
||||
{{ ('python-apt' if ansible_python_version is version('3', '<') else 'python3-apt') }}
|
||||
{% else %}\
|
||||
{% endif %}"
|
||||
{{ ('python-apt' if ansible_python_version is version('3', '<') else 'python3-apt') }}
|
||||
{% else %}\
|
||||
{% endif %}"
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
msg: "This module only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ _pkg_fact_req }}"
|
||||
state: present
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
msg: "This role only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
become: true
|
||||
ansible.builtin.package:
|
||||
name: "{{ _pkg_fact_req }}"
|
||||
state: present
|
||||
|
|
Loading…
Reference in a new issue