diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bcad97ceee61e2e6382b33b601ef45cd43374ca0..f971fc07f28a094de39a2d03babfb9d4e7efa4f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,11 +14,14 @@ variables: ANSIBLE_FORCE_COLOR: "1" ANSIBLE_REMOTE_TMP: "/tmp" ANSIBLE_SHELL_ALLOW_WORLD_READABLE_TEMP: "1" + DEBIAN_FRONTEND: noninteractive + DEFAULT_MANAGED_STR: "Ansible managed" MOLECULE_VERBOSITY: "0" PY_COLORS: "1" before_script: - whoami - pwd + - chmod 700 $(pwd) - which ansible - ansible --version - which yamllint diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7a89861f4857cb8488511f31e28fe85bef149058..5dee5eda6b87c41680838d3e6e2c896c897087ba 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: language: python additional_dependencies: # https://github.com/kellyjonbrazil/jc/releases - - jc==1.23.6 + - jc==1.24.0 # https://github.com/jmespath/jmespath.py/tags - jmespath==1.0.1 # https://github.com/jackdewinter/pymarkdown/releases diff --git a/meta/argument_specs.yml b/meta/argument_specs.yml index e3963bf5d464f7945219c00ca79b5969b786b5af..b39dc09705a9d2b8d46bb3decb688ea1cdef0e35 100644 --- a/meta/argument_specs.yml +++ b/meta/argument_specs.yml @@ -80,6 +80,10 @@ argument_specs: type: int required: true description: The port that Apache should listen on the localhost. + apache_matomo_domain: + type: str + required: false + description: An optional Matomo domain name for the webarch.conf template. apache_md_private_keys: type: list elements: str @@ -159,6 +163,14 @@ argument_specs: type: str required: false description: Internal variable for the PHP version. + apache_phpmyadmin_domain: + type: str + required: false + description: Optional phpMyAdmin domain name for the webarch.conf template. + apache_phpmyadmin_path: + type: str + required: false + description: Optional phpMyAdmin path for the webarch.conf template. apache_pkgs_absent: type: list elements: str diff --git a/templates/webarch.conf.j2 b/templates/webarch.conf.j2 index 2363413d37128b598c003a2af8ae75048fe7dc23..3cc99f4a99e39f166e0c5529e76e8623fe3cd80d 100644 --- a/templates/webarch.conf.j2 +++ b/templates/webarch.conf.j2 @@ -25,16 +25,16 @@ Alias /icons /usr/share/apache2/icons {% if apache_conf_enabled is defined and "phpmyadmin" in apache_conf_enabled %} SetEnv PHPMYADMIN_DOMAIN "{{ inventory_hostname }}" SetEnv PHPMYADMIN_PATH "/phpmyadmin/" -{% elif phpmyadmin_domain is defined %} -SetEnv PHPMYADMIN_DOMAIN "{{ phpmyadmin_domain }}" -{% if phpmyadmin_path is defined %} -SetEnv PHPMYADMIN_PATH "{{ phpmyadmin_path }}" +{% elif apache_phpmyadmin_domain is defined %} +SetEnv PHPMYADMIN_DOMAIN "{{ apache_phpmyadmin_domain }}" +{% if apache_phpmyadmin_path is defined %} +SetEnv PHPMYADMIN_PATH "{{ apache_phpmyadmin_path }}" {% else %} SetEnv PHPMYADMIN_PATH "/" {% endif %} {% endif %} -{% if matomo_domain is defined %} -SetEnv PIWIK_DOMAIN "{{ matomo_domain }}" +{% if apache_matomo_domain is defined %} +SetEnv PIWIK_DOMAIN "{{ apache_matomo_domain }}" {% endif %} SetEnv HOME_DOMAIN "webarch.net" SetEnv SITE_TITLE "Webarchitects Shared Hosting" @@ -135,9 +135,9 @@ ErrorDocument 506 /wsh/506.shtml SuexecUserGroup www-data www-data </IfModule> ServerAdmin support@webarch.net - {%- if matomo_domain is defined %} + {%- if apache_matomo_domain is defined %} SetEnv PIWIK_SITE_ID "1" - SetEnv PIWIK_SITE_DOMAIN "{{ matomo_domain }}" + SetEnv PIWIK_SITE_DOMAIN "{{ apache_matomo_domain }}" {%- elif matomo_user is defined %} SetEnv PIWIK_SITE_ID "1" SetEnv PIWIK_SITE_DOMAIN "stats.{{ inventory_hostname }}" @@ -145,11 +145,11 @@ ErrorDocument 506 /wsh/506.shtml DocumentRoot "/var/www/wsh" {% if apache_conf_enabled is defined and "phpmyadmin" in apache_conf_enabled %} RedirectPermanent /phpmyadmin https://{{ inventory_hostname }}/phpmyadmin -{% elif phpmyadmin_domain is defined %} -{% if phpmyadmin_path is defined %} - RedirectPermanent /phpmyadmin https://{{ phpmyadmin_domain }}{{ phpmyadmin_path }} +{% elif apache_phpmyadmin_domain is defined %} +{% if apache_phpmyadmin_path is defined %} + RedirectPermanent /phpmyadmin https://{{ apache_phpmyadmin_domain }}{{ apache_phpmyadmin_path }} {% else %} - RedirectPermanent /phpmyadmin https://{{ phpmyadmin_domain }} + RedirectPermanent /phpmyadmin https://{{ apache_phpmyadmin_domain }} {% endif %} {% endif %} <IfModule ssl_module> @@ -186,9 +186,9 @@ ErrorDocument 506 /wsh/506.shtml SuexecUserGroup www-data www-data </IfModule> ServerAdmin "{{ apache_server_admin }}" - {%- if matomo_domain is defined %} + {%- if apache_matomo_domain is defined %} SetEnv PIWIK_SITE_ID "1" - SetEnv PIWIK_SITE_DOMAIN "{{ matomo_domain }}" + SetEnv PIWIK_SITE_DOMAIN "{{ apache_matomo_domain }}" {%- elif matomo_user is defined %} SetEnv PIWIK_SITE_ID "1" SetEnv PIWIK_SITE_DOMAIN "stats.{{ inventory_hostname }}"