From 90404a966fbcc286a8c7206742804c02819faa8c Mon Sep 17 00:00:00 2001 From: Diego Alexandre Santos Ponciano Date: Mon, 11 Apr 2016 10:36:24 -0300 Subject: [PATCH 1/3] Added config for ngx_cache_purge module --- defaults/main.yml | 5 +++++ tasks/modules.yml | 3 +++ tasks/modules/ngx_cache_purge.yml | 11 +++++++++++ 3 files changed, 19 insertions(+) create mode 100644 tasks/modules/ngx_cache_purge.yml diff --git a/defaults/main.yml b/defaults/main.yml index dfbd41d..5fe4504 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -146,6 +146,11 @@ nginx_headers_more_version: "0.261" nginx_headers_more_url: "https://github.com/agentzh/headers-more-nginx-module/archive/v{{nginx_headers_more_version}}.tar.gz" +# ngx_cache_purge configuration +ngx_cache_purge_version: "2.3" +ngx_cache_purge_url: "http://labs.frickle.com/files/ngx_cache_purge-{{ngx_cache_purge_version}}.tar.gz" + + # http_auth_request_module configuration nginx_auth_request_release: "662785733552" nginx_auth_request_url: "http://mdounin.ru/hg/ngx_http_auth_request_module/archive/{{nginx_auth_request_release}}.tar.gz" diff --git a/tasks/modules.yml b/tasks/modules.yml index a48da33..89ceeba 100644 --- a/tasks/modules.yml +++ b/tasks/modules.yml @@ -41,3 +41,6 @@ - include: modules/http_geoip_module.yml when: nginx_source_modules_included.http_geoip_module is defined + +- include: modules/ngx_cache_purge.yml + when: nginx_source_modules_included.ngx_cache_purge is defined diff --git a/tasks/modules/ngx_cache_purge.yml b/tasks/modules/ngx_cache_purge.yml new file mode 100644 index 0000000..2cd71eb --- /dev/null +++ b/tasks/modules/ngx_cache_purge.yml @@ -0,0 +1,11 @@ +# file: nginx/tasks/modules/ngx_cache_purge.yml +# configure flag: --add-module=/tmp/ngx_cache_purge + +- name: Nginx | Modules | Download the ngx_cache_purge source + get_url: + url: "{{ngx_cache_purge_url}}" + dest: "/tmp/ngx_cache_purge-{{ngx_cache_purge_version}}.tar.gz" + +- name: Nginx | Modules | Unpack the ngx_cache_purge source + command: tar -xvzf /tmp/ngx_cache_purge-{{ngx_cache_purge_version}}.tar.gz + chdir=/tmp creates=/tmp/ngx_cache_purge-{{ngx_cache_purge_version}} From 211f12f847d0d7eea18ef123e850bae0dc8073ad Mon Sep 17 00:00:00 2001 From: Diego Alexandre Santos Ponciano Date: Mon, 11 Apr 2016 11:09:35 -0300 Subject: [PATCH 2/3] Added ngx_cache_purge to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 25bf3cc..e9c4c7c 100644 --- a/README.md +++ b/README.md @@ -106,6 +106,7 @@ nginx_source_modules_included: http_perl_module: "--with-http_perl_module" naxsi_module: "--add-module=/tmp/naxsi-{{nginx_naxsi_version}}/naxsi_src" ngx_pagespeed: "--add-module=/tmp/ngx_pagespeed-release-{{nginx_ngx_pagespeed_version}}-beta" + ngx_cache_purge: "--add-module=/tmp/ngx_cache_purge-{{ngx_cache_purge_version}}" geopip: "--with-http_geoip_module" ``` From 9aeb57596e66c1b0c71cc791515b3f442042c823 Mon Sep 17 00:00:00 2001 From: Diego Alexandre Santos Ponciano Date: Mon, 11 Apr 2016 12:24:23 -0300 Subject: [PATCH 3/3] Adds ngx_cache_purge to the defaults --- defaults/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/defaults/main.yml b/defaults/main.yml index 5fe4504..575177b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -84,6 +84,7 @@ nginx_source_modules_included: http_perl_module: "--with-http_perl_module" naxsi_module: "--add-module=/tmp/naxsi-{{nginx_naxsi_version}}/naxsi_src" ngx_pagespeed: "--add-module=/tmp/ngx_pagespeed-release-{{nginx_ngx_pagespeed_version}}-beta" + ngx_cache_purge: "--add-module=/tmp/ngx_cache_purge-{{ngx_cache_purge_version}}" http_geoip_module: "--with-http_geoip_module" nginx_source_modules_excluded: