Welcome to mirror list, hosted at ThFree Co, Russian Federation.

main.yml « tasks « common « roles « aws « lamp_haproxy - github.com/ansible/ansible-examples.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b82900c93b482a92f20daabb682034e79a8e160a (plain)
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
47
48
---
# This role contains common plays that will run on all nodes.

- name: Install python bindings for SE Linux
  yum: name={{ item }} state=present
  with_items:
   - libselinux-python
   - libsemanage-python

- name: Create the repository for EPEL
  copy: src=epel.repo dest=/etc/yum.repos.d/epel.repo

- name: Create the GPG key for EPEL
  copy: src=RPM-GPG-KEY-EPEL-6 dest=/etc/pki/rpm-gpg

- name: install some useful nagios plugins
  yum: name={{ item }} state=present
  with_items:
   - nagios-nrpe
   - nagios-plugins-swap
   - nagios-plugins-users
   - nagios-plugins-procs
   - nagios-plugins-load
   - nagios-plugins-disk

- name: Install ntp
  yum: name=ntp state=present
  tags: ntp

- name: Configure ntp file
  template: src=ntp.conf.j2 dest=/etc/ntp.conf
  tags: ntp
  notify: restart ntp

- name: Start the ntp service
  service: name=ntpd state=started enabled=yes
  tags: ntp

# work around RHEL 7, for now
- name: insert iptables template
  template: src=iptables.j2 dest=/etc/sysconfig/iptables
  when: ansible_distribution_major_version != '7'
  notify: restart iptables

- name: test to see if selinux is running
  command: getenforce
  register: sestatus
  changed_when: false