diff --git a/molecule/zammad/converge.yml b/molecule/zammad/converge.yml index 9a60aed3..2e4a5ad8 100644 --- a/molecule/zammad/converge.yml +++ b/molecule/zammad/converge.yml @@ -6,6 +6,8 @@ --- - name: "Converge" hosts: "all" + vars: + zammad_nginx_disabled: true tasks: - name: "Get private key content" diff --git a/roles/zammad/defaults/main.yml b/roles/zammad/defaults/main.yml index ef5ba32a..8b3fcadb 100644 --- a/roles/zammad/defaults/main.yml +++ b/roles/zammad/defaults/main.yml @@ -14,6 +14,7 @@ zammad_ssl_key_path: "/etc/ssl/private/zammad_key.pem" zammad_nginx_additional_server_configs: [] zammad_nginx_server_tokens: "off" +zammad_nginx_disabled: false elasticsearch_url: "http://localhost:9200" ... diff --git a/roles/zammad/handlers/main.yml b/roles/zammad/handlers/main.yml index 0b363106..aac95e90 100644 --- a/roles/zammad/handlers/main.yml +++ b/roles/zammad/handlers/main.yml @@ -8,6 +8,7 @@ ansible.builtin.service: name: "nginx" state: "reloaded" + when: "not zammad_nginx_disabled" - name: "Set Elasticsearch server address" ansible.builtin.command: >- diff --git a/roles/zammad/tasks/nginx-config.yml b/roles/zammad/tasks/nginx-config.yml index 8005f0cb..6cfe9e22 100644 --- a/roles/zammad/tasks/nginx-config.yml +++ b/roles/zammad/tasks/nginx-config.yml @@ -14,4 +14,12 @@ group: "root" notify: "Reload nginx" +- name: "Stop nginx" + ansible.builtin.service: + name: "nginx" + state: "stopped" + enabled: false + daemon_reload: true + when: "zammad_nginx_disabled" + ...