blob: 4de593d951373c8b8909b2cb336f409c79f71bf8 (
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
|
---
# These tasks install http and the php modules.
- name: Install http and php etc
yum:
name: "{{ item }}"
state: present
with_items:
- httpd
- php
- php-mysql
- git
- libsemanage-python
- libselinux-python
- name: insert iptables rule for httpd
lineinfile:
dest: /etc/sysconfig/iptables
create: yes
state: present
regexp: "{{ httpd_port }}"
insertafter: "^:OUTPUT "
line: "-A INPUT -p tcp --dport {{ httpd_port }} -j ACCEPT"
notify: restart iptables
- name: http service state
service:
name: httpd
state: started
enabled: yes
- name: Configure SELinux to allow httpd to connect to remote database
seboolean:
name: httpd_can_network_connect_db
state: true
persistent: yes
when: sestatus.rc != 0
|