mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-22 11:53:12 +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"
|
msg: "This module only works with systemd"
|
||||||
|
|
||||||
- name: Install package fact dependencies
|
- name: Install package fact dependencies
|
||||||
|
become: true
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ _pkg_fact_req }}"
|
name: "{{ _pkg_fact_req }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
msg: "This role only works with systemd"
|
msg: "This role only works with systemd"
|
||||||
|
|
||||||
- name: Install package fact dependencies
|
- name: Install package fact dependencies
|
||||||
|
become: true
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ _pkg_fact_req }}"
|
name: "{{ _pkg_fact_req }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
msg: "This role only works with systemd"
|
msg: "This role only works with systemd"
|
||||||
|
|
||||||
- name: Install package fact dependencies
|
- name: Install package fact dependencies
|
||||||
|
become: true
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ _pkg_fact_req }}"
|
name: "{{ _pkg_fact_req }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -5,15 +5,16 @@
|
||||||
msg: "This role only works with systemd"
|
msg: "This role only works with systemd"
|
||||||
|
|
||||||
- name: Install package fact dependencies
|
- name: Install package fact dependencies
|
||||||
|
become: true
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ _pkg_fact_req }}"
|
name: "{{ _pkg_fact_req }}"
|
||||||
state: present
|
state: present
|
||||||
when: (_pkg_fact_req)
|
when: (_pkg_fact_req)
|
||||||
vars:
|
vars:
|
||||||
_pkg_fact_req: "{% if (ansible_pkg_mgr == 'apt') %}\
|
_pkg_fact_req: "{% if (ansible_pkg_mgr == 'apt') %}\
|
||||||
{{ ('python-apt' if ansible_python_version is version('3', '<') else 'python3-apt') }}
|
{{ ('python-apt' if ansible_python_version is version('3', '<') else 'python3-apt') }}
|
||||||
{% else %}\
|
{% else %}\
|
||||||
{% endif %}"
|
{% endif %}"
|
||||||
|
|
||||||
- name: Gather package facts
|
- name: Gather package facts
|
||||||
ansible.builtin.package_facts:
|
ansible.builtin.package_facts:
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
msg: "This module only works with systemd"
|
msg: "This module only works with systemd"
|
||||||
|
|
||||||
- name: Install package fact dependencies
|
- name: Install package fact dependencies
|
||||||
|
become: true
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ _pkg_fact_req }}"
|
name: "{{ _pkg_fact_req }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
msg: "This role only works with systemd"
|
msg: "This role only works with systemd"
|
||||||
|
|
||||||
- name: Install package fact dependencies
|
- name: Install package fact dependencies
|
||||||
|
become: true
|
||||||
ansible.builtin.package:
|
ansible.builtin.package:
|
||||||
name: "{{ _pkg_fact_req }}"
|
name: "{{ _pkg_fact_req }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
Loading…
Reference in a new issue