switch to yum Ansible module when possible for repo management.
Change-Id: I53682eee2a9146a7b142deb34fd8ae7ea2244b0a
This commit is contained in:
parent
5169d338ed
commit
a53b69524b
@ -3,15 +3,8 @@
|
|||||||
# Install/run collectd for browbeat (Generic)
|
# Install/run collectd for browbeat (Generic)
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check for epel
|
- name: Check for EPEL repo
|
||||||
shell: rpm -qa | grep -q epel-release
|
yum: name=epel-release state=present
|
||||||
ignore_errors: true
|
|
||||||
register: epel_installed
|
|
||||||
|
|
||||||
- name: Install epel repo
|
|
||||||
command: rpm -ivh {{ epel_repo }}
|
|
||||||
become: true
|
|
||||||
when: epel_installed.rc != 0
|
|
||||||
|
|
||||||
- name: Install collectd rpms
|
- name: Install collectd rpms
|
||||||
yum: name={{ item }} state=present
|
yum: name={{ item }} state=present
|
||||||
@ -121,7 +114,8 @@
|
|||||||
service: name=collectd state=restarted enabled=true
|
service: name=collectd state=restarted enabled=true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Disable EPEL
|
- name: Disable EPEL Repo
|
||||||
shell: rpm -e epel-release
|
ini_file: dest=/etc/yum.repos.d/epel.repo
|
||||||
ignore_errors: true
|
section=epel
|
||||||
become: true
|
option=enabled
|
||||||
|
value=0
|
||||||
|
@ -3,15 +3,8 @@
|
|||||||
# Install/run collectd for browbeat
|
# Install/run collectd for browbeat
|
||||||
#
|
#
|
||||||
|
|
||||||
- name: Check for epel
|
- name: Check for EPEL repo
|
||||||
shell: rpm -qa | grep -q epel-release
|
yum: name=epel-release state=present
|
||||||
ignore_errors: true
|
|
||||||
register: epel_installed
|
|
||||||
|
|
||||||
- name: Install epel repo
|
|
||||||
command: rpm -ivh {{ epel_repo }}
|
|
||||||
become: true
|
|
||||||
when: epel_installed.rc != 0
|
|
||||||
|
|
||||||
- name: Install collectd rpms
|
- name: Install collectd rpms
|
||||||
yum: name={{ item }} state=present
|
yum: name={{ item }} state=present
|
||||||
@ -85,7 +78,8 @@
|
|||||||
service: name=collectd state=restarted enabled=true
|
service: name=collectd state=restarted enabled=true
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
- name: Disable EPEL
|
- name: Disable EPEL Repo
|
||||||
shell: rpm -e epel-release
|
ini_file: dest=/etc/yum.repos.d/epel.repo
|
||||||
ignore_errors: true
|
section=epel
|
||||||
become: true
|
option=enabled
|
||||||
|
value=0
|
||||||
|
Loading…
Reference in New Issue
Block a user