You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
ansible-role-nginx/lamp_haproxy/roles/web/tasks/install_httpd.yml

25 lines
767 B

---
# This playbook installs http and the php modules.
- name: Install http and php etc
action: yum name=$item state=installed
with_items:
- httpd
- php
- php-mysql
- libsemanage-python
- libselinux-python
- name: insert iptables rule for httpd
lineinfile: dest=/etc/sysconfig/iptables state=present regexp="$httpd_port" insertafter="^:OUTPUT " line="-A INPUT -p tcp --dport $httpd_port -j ACCEPT"
register: last_run
- name: Apply iptable rule
service: name=iptables state=restarted
only_if: ${last_run.changed}
- 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