From 2a7184a06babf750fd04a567bb15920c32b5a5a9 Mon Sep 17 00:00:00 2001 From: Alessandro Fael Garcia Date: Wed, 1 Aug 2018 11:40:35 -0700 Subject: [PATCH] Add option to delete license after installing NGINX Plus --- defaults/main.yml | 4 ++++ tasks/plus/delete-license.yml | 5 +++++ tasks/plus/install-plus.yml | 3 +++ 3 files changed, 12 insertions(+) create mode 100644 tasks/plus/delete-license.yml diff --git a/defaults/main.yml b/defaults/main.yml index c59791f..d3007e2 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -66,6 +66,10 @@ license: certificate: license/nginx-repo.crt key: license/nginx-repo.key +# Delete NGINX Plus license after installation for security purposes. +# Default is true. +delete_license: true + # Enable uploading NGINX configuration files to your system. # Default for uploading files is false. # Default location of files is the files folder within the NGINX Ansible role. diff --git a/tasks/plus/delete-license.yml b/tasks/plus/delete-license.yml new file mode 100644 index 0000000..ff4e4ad --- /dev/null +++ b/tasks/plus/delete-license.yml @@ -0,0 +1,5 @@ +--- +- name: "(All OSs) Delete NGINX Plus License" + file: + path: /etc/ssl/nginx + state: absent diff --git a/tasks/plus/install-plus.yml b/tasks/plus/install-plus.yml index 116d3bb..c71db4d 100644 --- a/tasks/plus/install-plus.yml +++ b/tasks/plus/install-plus.yml @@ -18,3 +18,6 @@ name: nginx-plus state: present notify: "(Handler: All OSs) Start NGINX" + +- import_tasks: delete-license.yml + when: delete_license