Skip to content

Commit 2a7184a

Browse files
committed
Add option to delete license after installing NGINX Plus
1 parent 882ac54 commit 2a7184a

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

defaults/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ license:
6666
certificate: license/nginx-repo.crt
6767
key: license/nginx-repo.key
6868

69+
# Delete NGINX Plus license after installation for security purposes.
70+
# Default is true.
71+
delete_license: true
72+
6973
# Enable uploading NGINX configuration files to your system.
7074
# Default for uploading files is false.
7175
# Default location of files is the files folder within the NGINX Ansible role.

tasks/plus/delete-license.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- name: "(All OSs) Delete NGINX Plus License"
3+
file:
4+
path: /etc/ssl/nginx
5+
state: absent

tasks/plus/install-plus.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@
1818
name: nginx-plus
1919
state: present
2020
notify: "(Handler: All OSs) Start NGINX"
21+
22+
- import_tasks: delete-license.yml
23+
when: delete_license

0 commit comments

Comments
 (0)