Skip to content

Adds suport to the fastcgi_cache_purge module #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
```

Expand Down
6 changes: 6 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -146,6 +147,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"
Expand Down
3 changes: 3 additions & 0 deletions tasks/modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 11 additions & 0 deletions tasks/modules/ngx_cache_purge.yml
Original file line number Diff line number Diff line change
@@ -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}}