-
Notifications
You must be signed in to change notification settings - Fork 1
/
CentOS7x_Enable-EPEL-Repository-playbook.yml
34 lines (26 loc) · 1.27 KB
/
CentOS7x_Enable-EPEL-Repository-playbook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
################################################################################
# description: Enables EPEL Repository on CentOS7x
# usage: ansible-playbook CentOS7x_Enable-EPEL-Repository-playbook.yml --extra-vars 'HostOrGroup=YourServerOrGroupNameGoesHere'
# author: Ernest G. Wilson II <[email protected]> (https://github.com/ernestgwilsonii)
# license: MIT
################################################################################
# Ansible Playbook options
# REF: http://docs.ansible.com/ansible/playbooks.html
#####################################################
- name: Enables EPEL Repository on CentOS7x
hosts: "{{ HostOrGroup|default ('FATAL ERROR --> HostOrGroup NOT SET! You must specify either a Host or a Group name!') }}"
serial: "100%"
gather_facts: False
tasks:
# Install yum packages
# REF: http://docs.ansible.com/ansible/yum_module.html
######################################################
- name: Install wget if that package is not already present or update existing if needed
yum:
name: wget
state: latest
- name: Install epel-release-7-11.noarch.rpm if that package is not already present
yum:
name: http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
state: present