From 779199841467f5171b3fdcb257357bad409711fb Mon Sep 17 00:00:00 2001 From: David Farrington Date: Fri, 3 Apr 2015 11:05:24 +0100 Subject: [PATCH] Update modules when they have changed --- tasks/modules/headers_more_module.yml | 4 +++- tasks/modules/http_auth_request_module.yml | 5 +++-- tasks/modules/http_echo_module.yml | 4 +++- tasks/modules/naxsi_module.yml | 4 +++- tasks/modules/ngx_pagespeed.yml | 2 +- tasks/modules/upload_progress_module.yml | 5 ++++- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tasks/modules/headers_more_module.yml b/tasks/modules/headers_more_module.yml index 45c89c9..b48851b 100644 --- a/tasks/modules/headers_more_module.yml +++ b/tasks/modules/headers_more_module.yml @@ -5,9 +5,11 @@ get_url: url: "{{nginx_headers_more_url}}" dest: "/tmp/nginx-headers-more-module-{{nginx_headers_more_version}}.tar.gz" + register: nginx_headers_more_download - name: Nginx | Modules | Unpack the headers_more_module source command: tar -xvzf /tmp/nginx-headers-more-module-{{nginx_headers_more_version}}.tar.gz chdir=/tmp creates=/tmp/headers-more-nginx-module-{{nginx_headers_more_version}} - name: Nginx | Modules | Copy the headers_more_module source folder - command: sudo cp -R /tmp/headers-more-nginx-module-{{nginx_headers_more_version}} /tmp/nginx_headers_more creates=/tmp/nginx_headers_more + command: sudo cp -R /tmp/headers-more-nginx-module-{{nginx_headers_more_version}} /tmp/nginx_headers_more + when: nginx_headers_more_download|changed diff --git a/tasks/modules/http_auth_request_module.yml b/tasks/modules/http_auth_request_module.yml index 2e4caef..18a254f 100644 --- a/tasks/modules/http_auth_request_module.yml +++ b/tasks/modules/http_auth_request_module.yml @@ -5,10 +5,11 @@ get_url: url: "{{nginx_auth_request_url}}" dest: "/tmp/nginx-auth-request-module.tar.gz" + register: nginx_auth_request_download - name: Nginx | Modules | Unpack the http_auth_request_module source command: tar -xvzf /tmp/nginx-auth-request-module.tar.gz chdir=/tmp creates=/tmp/ngx_http_auth_request_module-{{nginx_auth_request_release}} - name: Nginx | Modules | Copy the http_auth_request_module source folder - command: sudo cp -R /tmp/ngx_http_auth_request_module-{{nginx_auth_request_release}} /tmp/nginx_auth_request creates=/tmp/nginx_auth_request - + command: sudo cp -R /tmp/ngx_http_auth_request_module-{{nginx_auth_request_release}} /tmp/nginx_auth_request + wheb: nginx_auth_request_download|changed diff --git a/tasks/modules/http_echo_module.yml b/tasks/modules/http_echo_module.yml index 2392186..874d079 100644 --- a/tasks/modules/http_echo_module.yml +++ b/tasks/modules/http_echo_module.yml @@ -5,9 +5,11 @@ get_url: url: "{{nginx_echo_url}}" dest: "/tmp/nginx-echo-module.tar.gz" + register: nginx_echo_download - name: Nginx | Modules | Unpack the http_echo_module source command: tar -xvzf /tmp/nginx-echo-module.tar.gz chdir=/tmp creates=/tmp/echo-nginx-module-{{nginx_echo_version}} - name: Nginx | Modules | Copy the http_echo_module source folder - command: sudo cp -R /tmp/echo-nginx-module-{{nginx_echo_version}} /tmp/nginx_echo creates=/tmp/nginx_echo + command: sudo cp -R /tmp/echo-nginx-module-{{nginx_echo_version}} /tmp/nginx_echo + when: nginx_echo_download|changed diff --git a/tasks/modules/naxsi_module.yml b/tasks/modules/naxsi_module.yml index f085578..48b334b 100644 --- a/tasks/modules/naxsi_module.yml +++ b/tasks/modules/naxsi_module.yml @@ -5,12 +5,14 @@ get_url: url: "{{nginx_naxsi_url}}" dest: "/tmp/nginx-naxsi-module.tar.gz" + register: nginx_naxsi_download - name: Nginx | Modules | Unpack the naxsi_module source command: tar -xvzf /tmp/nginx-naxsi-module.tar.gz chdir=/tmp creates=/tmp/naxsi-{{nginx_naxsi_version}} - name: Nginx | Modules | Copy the naxsi_module source folder - command: sudo cp -R /tmp/naxsi-{{nginx_naxsi_version}}/naxsi_src /tmp/nginx_naxsi creates=/tmp/nginx_naxsi + command: sudo cp -R /tmp/naxsi-{{nginx_naxsi_version}}/naxsi_src /tmp/nginx_naxsi + when: nginx_naxsi_download|changed - name: Nginx | Modules | Make sure the naxsi_module configuration is up to date copy: diff --git a/tasks/modules/ngx_pagespeed.yml b/tasks/modules/ngx_pagespeed.yml index 70bc599..9cd7da1 100644 --- a/tasks/modules/ngx_pagespeed.yml +++ b/tasks/modules/ngx_pagespeed.yml @@ -23,7 +23,7 @@ - name: Nginx | Modules | Copy the ngx_pagespeed source folder command: sudo cp -R /tmp/ngx_pagespeed-release-{{nginx_ngx_pagespeed_version}}-beta /tmp/ngx_pagespeed - when: ngx_pagespeed_download.changed + when: ngx_pagespeed_download|changed - name: Nginx | Modules | Download the psol source get_url: diff --git a/tasks/modules/upload_progress_module.yml b/tasks/modules/upload_progress_module.yml index 3ae17cc..ae7f2df 100644 --- a/tasks/modules/upload_progress_module.yml +++ b/tasks/modules/upload_progress_module.yml @@ -7,12 +7,15 @@ get_url: url: "{{nginx_upload_progress_url}}" dest: "/tmp/nginx-upload-progress-module-{{nginx_upload_progress_version}}.tar.gz" + register: nginx_upload_progress_download - name: Nginx | Modules | Unpack the upload_progress_module source command: tar -xvzf /tmp/nginx-upload-progress-module-{{nginx_upload_progress_version}}.tar.gz chdir=/tmp creates=/tmp/nginx-upload-progress-module-{{nginx_upload_progress_version}} + when: nginx_upload_progress_download|changed - name: Nginx | Modules | Copy the upload_progress_module source folder - command: sudo cp -R /tmp/nginx-upload-progress-module-{{nginx_upload_progress_version}} /tmp/nginx_upload_progress creates=/tmp/nginx_upload_progress + command: sudo cp -R /tmp/nginx-upload-progress-module-{{nginx_upload_progress_version}} /tmp/nginx_upload_progress + when: nginx_upload_progress_download|changed - name: Nginx | Modules | Make sure the upload_progress_module configuration is updated template: