Merge pull request 'Other EL 7 vs 8 pkg names differences.' (!241) from adellam/ansible-roles:master into master
Reviewed-on: #241
This commit is contained in:
commit
49b9e57de1
|
@ -18,6 +18,10 @@ el_dnf_automation: False
|
|||
centos8_packages_automation:
|
||||
- dnf-automatic
|
||||
|
||||
centos7_packages_to_install:
|
||||
- policycoreutils-python
|
||||
centos8_packages_to_install:
|
||||
- policycoreutils-python-utils
|
||||
centos_packages_to_install:
|
||||
- dstat
|
||||
- lsof
|
||||
|
@ -26,7 +30,6 @@ centos_packages_to_install:
|
|||
- bind-utils
|
||||
- whois
|
||||
- iotop
|
||||
- policycoreutils-python
|
||||
- firewalld
|
||||
- ipset
|
||||
- psmisc
|
||||
|
|
|
@ -1,8 +1,24 @@
|
|||
---
|
||||
- name: Install the basic packages
|
||||
- name: Install the basic packages commont to CentOS 7 and 8+
|
||||
yum: name={{ centos_packages_to_install }} state={{ centos_pkg_state }}
|
||||
tags: [ 'centos', 'bootstrap', 'packages' ]
|
||||
|
||||
- name: Install CentOS 7 packages
|
||||
yum:
|
||||
pkg: '{{ centos7_packages_to_install }}'
|
||||
state: present
|
||||
when:
|
||||
- ansible_distribution_file_variety == "RedHat"
|
||||
- ansible_distribution_major_version is version_compare('7', '<=')
|
||||
|
||||
- name: Install CentOS 8 packages
|
||||
dnf:
|
||||
pkg: '{{ centos8_packages_to_install }}'
|
||||
state: present
|
||||
when:
|
||||
- ansible_distribution_file_variety == "RedHat"
|
||||
- ansible_distribution_major_version is version_compare('8', '>=')
|
||||
|
||||
- name: Install the packages to automate some yum tasks on CentOS 7
|
||||
yum:
|
||||
pkg: '{{ centos7_packages_automation }}'
|
||||
|
|
Loading…
Reference in New Issue