From b32959ce2c4cbd746ba767f677e2e152bea3bcd1 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Mon, 3 Oct 2016 18:27:39 +0200 Subject: [PATCH] library/roles/nginx: Remove some old installed snipped that can conflict with the new ones. --- nginx/defaults/main.yml | 3 +++ nginx/tasks/nginx-config.yml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/nginx/defaults/main.yml b/nginx/defaults/main.yml index 44231dad..229206eb 100644 --- a/nginx/defaults/main.yml +++ b/nginx/defaults/main.yml @@ -16,6 +16,9 @@ nginx_conf_snippets: - nginx-proxy-params.conf - nginx-server-ssl.conf +nginx_old_snippets: + - compression.conf + nginx_workers: 4 nginx_worker_connections: 1024 nginx_multi_accept: 'off' diff --git a/nginx/tasks/nginx-config.yml b/nginx/tasks/nginx-config.yml index 06ea36f5..60d82f22 100644 --- a/nginx/tasks/nginx-config.yml +++ b/nginx/tasks/nginx-config.yml @@ -15,5 +15,9 @@ template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf mode=444 notify: Reload nginx + - name: Remove the old configuration snippets + file: dest=/etc/nginx/conf.d/{{ item }} state=absent + with_items: '{{ nginx_old_snippets }}' + when: nginx_enabled tags: [ 'nginx', 'nginx_conf', 'nginx_virtualhost' ]