summaryrefslogtreecommitdiffstats
path: root/roles/common/tasks/deps.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common/tasks/deps.yml')
-rw-r--r--roles/common/tasks/deps.yml30
1 files changed, 16 insertions, 14 deletions
diff --git a/roles/common/tasks/deps.yml b/roles/common/tasks/deps.yml
index f7ac9de..bf444a3 100644
--- a/roles/common/tasks/deps.yml
+++ b/roles/common/tasks/deps.yml
@@ -1,21 +1,23 @@
- name: Installation des dépendances du playbook
- dnf: name={{ item }} state=present
- with_items:
- - libselinux-python
- - python-dnf
+ package:
+ name: python-dnf
+ state: present
when: ansible_pkg_mgr == "dnf"
- name: Installation du module firewall pour python2
- dnf: name=python-firewall state=present
- when: ansible_pkg_mgr == "dnf" and ansible_distribution_version|int <= 27
+ package:
+ name: python-firewall
+ state: present
+ when: ansible_distribution == "Fedora" and ansible_distribution_version|int <= 27
+ or ansible_distribution == "CentOS"
- name: Installation du module firewall pour python3
- dnf: name=python3-firewall state=present
- when: ansible_pkg_mgr == "dnf" and ansible_distribution_version|int >= 28
+ package:
+ name: python3-firewall
+ state: present
+ when: ansible_distribution == "Fedora" and ansible_distribution_version|int >= 28
-- name: Installation des dépendances du playbook
- yum: name={{ item }} state=present
- with_items:
- - libselinux-python
- - python-firewall
- when: ansible_pkg_mgr == "yum"
+- name: Installation du module SELinux pour python
+ package:
+ name: libselinux-python
+ state: present