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: fd72ac8f3351e2e159fa3b0230af8d03878d2b0f (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
# 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