Compare commits
5 Commits
180aa7c404
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 7dd6b51c2c | |||
| 3db2160549 | |||
| dfdae74445 | |||
| 2d4e5a5853 | |||
| a882c50e2a |
@@ -15,3 +15,10 @@ apache_use_ssl: true
|
||||
apache_use_stats: true
|
||||
apache_user: "{{ apache_server_name | regex_search( '([^.]+)' ) }}"
|
||||
apache_use_database: false
|
||||
apache_modules_list:
|
||||
- headers
|
||||
- http2
|
||||
- rewrite
|
||||
- proxy
|
||||
- proxy_http
|
||||
- proxy_fcgi
|
||||
|
||||
@@ -47,7 +47,6 @@ galaxy_info:
|
||||
# Maximum 20 tags per role.
|
||||
|
||||
dependencies:
|
||||
- role: tconstans.apache
|
||||
- { role: tco.changelog, myrole_name: ansible_apache_vhost }
|
||||
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
|
||||
# if you add dependencies to this list.
|
||||
@@ -1,12 +1,8 @@
|
||||
---
|
||||
# tasks file for apache_vhost
|
||||
|
||||
<<<<<<< HEAD
|
||||
- include_vars: "{{ ansible_os_family|lower }}.yml"
|
||||
tags: always
|
||||
=======
|
||||
- include_vars: "{{ ansible_os_family}}.yml"
|
||||
>>>>>>> certbot
|
||||
tags: always
|
||||
|
||||
- name: create dedicated user
|
||||
user:
|
||||
@@ -43,6 +39,14 @@
|
||||
- "{{ apache_base_dir }}/session"
|
||||
- "{{ apache_base_dir }}/wsdlcache"
|
||||
|
||||
- name: enable some modules
|
||||
when: ansible_os_family == 'Debian'
|
||||
tags: modules
|
||||
community.general.apache2_module:
|
||||
state: present
|
||||
name: "{{ item }}"
|
||||
loop: "{{ apache_modules_list }}"
|
||||
|
||||
- name: dns setup
|
||||
include_tasks: dns.yml
|
||||
when: apache_use_dns
|
||||
@@ -75,3 +79,4 @@
|
||||
import_tasks: goaccess.yml
|
||||
when: apache_use_stats
|
||||
tags: stats
|
||||
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
Options +indexes
|
||||
</Directory>
|
||||
{%if apache_use_ssl %}
|
||||
<IfModule rewrite>
|
||||
RewriteEngine on
|
||||
RewriteCond %{HTTPS} off
|
||||
RewriteCond %{REQUEST_URI} "!^/\.well-known"
|
||||
RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
|
||||
</IfModule>
|
||||
{%endif %}
|
||||
</VirtualHost>
|
||||
|
||||
@@ -26,6 +28,7 @@
|
||||
ServerAlias {{ alias }}
|
||||
{%endfor%}
|
||||
{%endif%}
|
||||
Protocols h2 http/1.1
|
||||
DocumentRoot {{ apache_document_root }}
|
||||
SSLEngine on
|
||||
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#/home/tom/Documents/Opendoor/Technique/Ansible/roles/tconstans.apache/vars/Debian.yml
|
||||
apache_config_dir: /etc/apache2/sites-enabled/
|
||||
apache_packages:
|
||||
- apache2
|
||||
apache_ssl_packages: openssl
|
||||
apache_service: apache2
|
||||
apache_group: www-data
|
||||
apache_service_name: apache2
|
||||
apache_config_dir: /etc/apache2/sites-enabled/
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
|
||||
#/home/tom/Documents/Opendoor/Technique/Ansible/roles/tconstans.apache/vars/Debian.yml
|
||||
#/home/tom/Documents/Opendoor/Technique/Ansible/roles/tco.apache_vhost/vars/RedHat.yml
|
||||
apache_config_dir: /etc/httpd/conf.d/
|
||||
apache_packages:
|
||||
- httpd
|
||||
apache_service: httpd
|
||||
apache_service_name: httpd
|
||||
apache_ssl_packages: mod_ssl
|
||||
apache_group: apache
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
apache_group: www-data
|
||||
apache_config_dir: /etc/apache2/sites-enabled/
|
||||
apache_service_name: apache2
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
apache_group: apache
|
||||
apache_config_dir: /etc/httpd/conf.d/
|
||||
apache_service_name: httpd
|
||||
Reference in New Issue
Block a user