Install dnf on CentOS hosts
This patch adds dnf to CentOS hosts to provide better package manager performance. Implements: blueprint centos-and-dnf Change-Id: Ieea80e88652dd84851aeed9a1910f86ec7ba86d0
This commit is contained in:
parent
9b9dde4745
commit
7401dddaa2
@ -24,12 +24,15 @@
|
||||
gather_facts: false
|
||||
user: root
|
||||
pre_tasks:
|
||||
- name: Ensure python is installed
|
||||
- name: Install prerequisites before setting up the host
|
||||
register: result
|
||||
raw: |
|
||||
if which apt-get >/dev/null && ! which python >/dev/null ; then
|
||||
if which apt-get > /dev/null && ! which python > /dev/null ; then
|
||||
apt-get -y install python
|
||||
exit 2
|
||||
elif which yum > /dev/null && ! which dnf > /dev/null ; then
|
||||
yum --disablerepo=extras -y install dnf dnf-plugins-core python-dnf
|
||||
exit 2
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user