diff --git a/defaults/main.yml b/defaults/main.yml index 9c6792a7a67fa512e1b9d10576a884796d3824db..cc42156b3a4af742abdfac4d3b015b81a070b563 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,6 +8,7 @@ # # You should have received a copy of the GNU General Public License along with the Webarchitects Apache Ansible role. If not, see <https://www.gnu.org/licenses/>. --- +apache: false apache_user: www-data apache_group: www-data apache_document_root: /var/www/html diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index e78a38fe432b03f170283ecc99ab86de91f3759a..e76ddc8fe89262c0fd4244a0b859db753f02786d 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -34,5 +34,73 @@ ansible.builtin.include_role: name: "{{ lookup('ansible.builtin.env', 'CI_PROJECT_NAME') }}" vars: # noqa var-naming[no-role-prefix] - openproject: true + apache: true + apache_mods_disabled: + - ssl + apache_mods_enabled: + - access_compat + - alias + - auth_basic + - authn_core + - authn_file + - authz_core + - authz_host + - authz_user + - autoindex + - deflate + - dir + - env + - expires + - filter + - headers + - http2 + - include + - mime + - mpm_event + - negotiation + - proxy + - proxy_fcgi + - proxy_http2 + - proxy_http + - proxy_wstunnel + - reqtimeout + - remoteip + - rewrite + - setenvif + - socache_shmcb + - status + apache_conf_disabled: + - le + apache_conf_enabled: + - access_compat + - alias + - auth_basic + - authn_core + - authn_file + - authz_core + - authz_host + - authz_user + - autoindex + - deflate + - dir + - env + - expires + - filter + - headers + - http2 + - include + - mime + - mpm_event + - negotiation + - proxy + - proxy_fcgi + - proxy_http2 + - proxy_http + - proxy_wstunnel + - reqtimeout + - remoteip + - rewrite + - setenvif + - socache_shmcb + - status ... diff --git a/tasks/main.yml b/tasks/main.yml index c471903095679808ad8384c49af66ff00f369bd8..4aad92fe4386d26d9fec4e25129f0b16f12aed2f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -8,6 +8,13 @@ # # You should have received a copy of the GNU General Public License along with the Webarchitects Apache Ansible role. If not, see <https://www.gnu.org/licenses/>. --- +- name: Apache role skipped + ansible.builtin.debug: + msg: "The tasks in the Apache role are not being run since the apache variables is not true." + when: not apache | bool + tags: + - apache + - name: Install and configure Apache block: @@ -157,6 +164,7 @@ state: restarted when: ( "Syntax OK" in apache_configtest.stderr ) or ( apache_configtest.rc == 0 ) + when: apache | bool tags: - apache ...