Created
February 15, 2017 19:19
-
-
Save kovid-rathee/ee2441a2f58b777ee04ec673f63bcbb0 to your computer and use it in GitHub Desktop.
Basic Ansible Role to install and configure Apache HTTP Server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: install apache | |
yum: name=httpd state=present | |
- name: insert firewalld rule for httpd | |
firewalld: port={{httpd_port}}/tcp permanent=true state=enabled immediate=yes | |
- name: start and enable apache | |
service: name=httpd state=started enabled=yes | |
- name: configure SELinux to allow httpd to connect to remote database | |
seboolean: name=httpd_can_work_connect_db state=true persistent=yes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This needs a group var file that contains httpd_port and other variables used in this Role