mirror of
https://github.com/prometheus-community/ansible
synced 2024-11-10 06:14:13 +00:00
fix: install package_facts dependencies
Signed-off-by: gardar <gardar@users.noreply.github.com>
This commit is contained in:
parent
70c1e9b63a
commit
6fa5e0528a
4 changed files with 44 additions and 0 deletions
|
@ -4,6 +4,17 @@
|
|||
that: ansible_service_mgr == 'systemd'
|
||||
msg: "This module only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
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 %}"
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
when: "not 'packages' in ansible_facts"
|
||||
|
|
|
@ -4,6 +4,17 @@
|
|||
that: ansible_service_mgr == 'systemd'
|
||||
msg: "This role only works with systemd"
|
||||
|
||||
- name: Install package fact dependencie
|
||||
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 %}"
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
when: "not 'packages' in ansible_facts"
|
||||
|
|
|
@ -4,6 +4,17 @@
|
|||
that: ansible_service_mgr == 'systemd'
|
||||
msg: "This role only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
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 %}"
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
when: "not 'packages' in ansible_facts"
|
||||
|
|
|
@ -4,6 +4,17 @@
|
|||
that: ansible_service_mgr == 'systemd'
|
||||
msg: "This module only works with systemd"
|
||||
|
||||
- name: Install package fact dependencies
|
||||
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 %}"
|
||||
|
||||
- name: Gather package facts
|
||||
ansible.builtin.package_facts:
|
||||
when: "not 'packages' in ansible_facts"
|
||||
|
|
Loading…
Reference in a new issue