-
Notifications
You must be signed in to change notification settings - Fork 2
/
Template-Packages-RHEL.yml
46 lines (46 loc) · 1.5 KB
/
Template-Packages-RHEL.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
35
36
37
38
39
40
41
42
43
44
45
46
---
- name: install EPEL (RHEL 5)
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 5
shell: rpm -Uvh http://mirror.pnl.gov/epel/5/i386/epel-release-5-4.noarch.rpm
ignore_errors: true
- name: install EPEL (RHEL 6)
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 6
yum: name=http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm state=present
- name: install EPEL (RHEL 7)
when: ansible_os_family == "RedHat" and ansible_distribution_major_version|int == 7
yum: name=http://mirror.pnl.gov/epel/7/x86_64/e/epel-release-7-5.noarch.rpm state=present
- name: install "core" packages (RHEL)
when: ansible_os_family == "RedHat"
yum: name={{ item }} state=latest
with_items:
- openssh-clients
- vim-enhanced
- screen
- tmux
- curl
- wget
- lynx
- links
- sudo
- libselinux-python
- git
- rsyslog
- rsync
- nmap
- nc
- strace
- bind-utils
- iotop
- htop
- name: update system (RHEL)
when: ansible_os_family == "RedHat"
command: yum upgrade -y
- name: set selinux to permissive
when: ansible_os_family == "RedHat"
selinux: policy=targeted state=permissive
- name: set timezone to UTC (RHEL)
when: ansible_os_family == "RedHat"
shell: "rm -f /etc/localtime && ln -s /usr/share/zoneinfo/UTC /etc/localtime"
- name: install vmware tools (RHEL/vmware)
yum: name=open-vm-tools state=latest
when: ansible_os_family == "RedHat" and ansible_virtualization_type == "VMware"