Add Apache role
This commit is contained in:
parent
20cfbdaf75
commit
4328f2cdec
7
apache/README.md
Normal file
7
apache/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# apache
|
||||
|
||||
Install Apache
|
||||
|
||||
## Tasks
|
||||
|
||||
Everything is in the `tasks/main.yml` file for now.
|
1
apache/files/ipaddr_whitelist.conf
Normal file
1
apache/files/ipaddr_whitelist.conf
Normal file
|
@ -0,0 +1 @@
|
|||
#Allow from 192.0.2.42
|
14
apache/files/z_evolix.conf
Normal file
14
apache/files/z_evolix.conf
Normal file
|
@ -0,0 +1,14 @@
|
|||
ServerTokens Prod
|
||||
Timeout 10
|
||||
KeepAliveTimeout 2
|
||||
MaxKeepAliveRequests 10
|
||||
MaxClients 250
|
||||
ServerLimit 250
|
||||
StartServers 50
|
||||
MinSpareServers 20
|
||||
MaxSpareServers 30
|
||||
MaxRequestsPerChild 0
|
||||
<Directory /home/>
|
||||
AllowOverride None
|
||||
Require all granted
|
||||
</Directory>
|
26
apache/tasks/main.yml
Normal file
26
apache/tasks/main.yml
Normal file
|
@ -0,0 +1,26 @@
|
|||
- name: ensure packages are installed
|
||||
apt:
|
||||
name: '{{ item }}'
|
||||
state: installed
|
||||
with_items:
|
||||
- apache2-mpm-itk
|
||||
- apachetop
|
||||
- libapache2-mod-evasive
|
||||
- libwww-perl
|
||||
|
||||
- name: ensure basic modules are enabled
|
||||
command: a2enmod rewrite expires headers rewrite cgi
|
||||
changed_when: false
|
||||
|
||||
- name : copy Apache default config
|
||||
copy: src=z_evolix.conf dest=/etc/apache2/conf-available/z_evolix.conf owner=root group=root mode=0644
|
||||
|
||||
- name: ensure Apache default config is enabled
|
||||
command: a2enconf z_evolix.conf
|
||||
changed_when: false
|
||||
|
||||
- name: init ipaddr_whitelist.conf file
|
||||
copy: src=ipaddr_whitelist.conf dest=/etc/apache2/ipaddr_whitelist.conf owner=root group=root mode=0640 force=no
|
||||
|
||||
- name : ensure umask is in envvars
|
||||
lineinfile: dest=/etc/apache2/envvars regexp="^umask" line="umask 077"
|
Loading…
Reference in a new issue