--- - 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: | # Revoke default permissions granted in `/etc/apache2/mods-available/status.conf`. Require all denied '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' ]