forked from ravi2krishna/playbooks-mdp159
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path14-handlers.yml
64 lines (51 loc) · 1.17 KB
/
14-handlers.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
---
- name: Config Apache Web Server
hosts: all
become: yes
vars:
user_name: ravi
custom_http_port: 80
tasks:
- name: Copy config to centos httpd
template:
src: httpd.j2
dest: /etc/httpd/conf/httpd.conf
when: ansible_distribution == "CentOS"
notify:
- Restart HTTPD
- name: Set Permissive For HTTPD
selinux:
policy: targeted
state: permissive
when: ansible_distribution == "CentOS"
- name: Copy config to ubuntu apache2
template:
src: ports.j2
dest: /etc/apache2/ports.conf
when: ansible_distribution == "Ubuntu"
notify:
- Restart APACHE2
- name: Copy Date App
copy:
src: date.php
dest: /var/www/html/date.php
when: ansible_distribution == "CentOS"
- name: Install PHP
yum:
name: php
state: present
when: ansible_distribution == "CentOS"
notify:
- Restart HTTPD
handlers:
- name: Restart APACHE2
service:
name: apache2
state: restarted
when: ansible_distribution == "Ubuntu"
- name: Restart HTTPD
service:
name: httpd
state: restarted
when: ansible_distribution == "CentOS"
...