+ latest extensions - deployed nginx, apache, php 74 & 81, nvm, automatic databases import and phpmyadmin with nginx basic auth
+ dhcp dnsmasq server playbook for create inner server network #861m7vaer Шаблон операционной системы на Debian 10
This commit is contained in:
65
playbooks/debops/apache.yml
Normal file
65
playbooks/debops/apache.yml
Normal file
@ -0,0 +1,65 @@
|
||||
---
|
||||
|
||||
- name: Manage and configure the Apache HTTP Server
|
||||
collections: [ 'debops.debops', 'debops.roles01',
|
||||
'debops.roles02', 'debops.roles03' ]
|
||||
hosts: [ 'debian10' ]
|
||||
become: True
|
||||
|
||||
environment: '{{ inventory__environment | d({})
|
||||
| combine(inventory__group_environment | d({}))
|
||||
| combine(inventory__host_environment | d({})) }}'
|
||||
|
||||
vars:
|
||||
apache__base_packages:
|
||||
- libapache2-mod-php8.1
|
||||
apache__role_modules:
|
||||
'headers': True
|
||||
'alias': True
|
||||
'php7.4': True
|
||||
'ssl':
|
||||
enabled: '{{ True if (apache__https_listen and apache__https_enabled) else False }}'
|
||||
'security2':
|
||||
enabled: '{{ apache__security_module_enabled|bool }}'
|
||||
'status':
|
||||
enabled: '{{ apache__status_enabled|bool }}'
|
||||
config: |
|
||||
<Location /server-status>
|
||||
# Revoke default permissions granted in `/etc/apache2/mods-available/status.conf`.
|
||||
Require all denied
|
||||
</Location>
|
||||
'socache_shmcb':
|
||||
enabled: '{{ True
|
||||
if (apache__ocsp_stapling_enabled|bool
|
||||
and "shmcb" in apache__ocsp_stapling_cache)
|
||||
else omit }}'
|
||||
'authz_host':
|
||||
enabled: '{{ True
|
||||
if (apache__status_enabled|bool
|
||||
and apache__status_allow_localhost)
|
||||
else omit }}'
|
||||
'rewrite':
|
||||
enabled: '{{ True
|
||||
if (apache__register_mod_rewrite_used is defined and
|
||||
apache__register_mod_rewrite_used.rc|d(1) == 0)
|
||||
else omit }}'
|
||||
apache__allow:
|
||||
- 0.0.0.0
|
||||
# apache__default_vhost:
|
||||
# name: '{{ apache__default_vhost_name }}'
|
||||
# filename: '000-default'
|
||||
# root: '/var/www/html'
|
||||
apache__vhost_allow_override: 'All'
|
||||
|
||||
pre_tasks:
|
||||
|
||||
- name: Prepare apache environment
|
||||
import_role:
|
||||
name: 'apache'
|
||||
tasks_from: 'main_env'
|
||||
tags: [ 'role::apache', 'role::apache:env' ]
|
||||
|
||||
roles:
|
||||
|
||||
- role: apache
|
||||
tags: [ 'role::apache', 'skip::apache' ]
|
||||
Reference in New Issue
Block a user