Skip to content

Commit 84e9244

Browse files
committed
temp directory variable
1 parent 4c4f5cc commit 84e9244

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ nginx_start: true
3232
# Increase NGINX service timeout to accomdate ruleset loading from default 90s
3333
nginx_timeout: 180
3434

35+
# App Protect Temporary Directory to use (Default: /opt/app_protect/tmp)
36+
app_protect_tempdir: /opt/app_protect/tmp
37+
3538
# Choose where to fetch the NGINX App Protect signing key from.
3639
# Default is the official NGINX App Protect signing key host.
3740
# app_protect_signing_key: https://cs.nginx.com/static/keys/app-protect.key

tasks/prerequisites/setup-selinux.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,43 +94,43 @@
9494
- name: "(Install: SELinux: Module) Create NGINX Plus App Protect Module"
9595
template:
9696
src: nginx-plus-module-appprotect.te.j2
97-
dest: /opt/app_protect/tmp/nginx-plus-module-appprotect.te
97+
dest: "{{ app_protect_tempdir }}/nginx-plus-module-appprotect.te"
9898

9999
- name: "(Install: SELinux: Module) Check NGINX Plus App Protect Module"
100-
command: checkmodule -M -m -o /opt/app_protect/tmp/nginx-plus-module-appprotect.mod /opt/app_protect/tmp/nginx-plus-module-appprotect.te
100+
command: "checkmodule -M -m -o {{ app_protect_tempdir }}/nginx-plus-module-appprotect.mod {{ app_protect_tempdir }}/nginx-plus-module-appprotect.te"
101101
args:
102-
creates: /opt/app_protect/tmp/nginx-plus-module-appprotect.mod
102+
creates: "{{ app_protect_tempdir }}/nginx-plus-module-appprotect.mod"
103103
changed_when: false
104104

105105
- name: "(Install: SELinux: Module) Compile NGINX Plus App Protect Module"
106-
command: semodule_package -o /opt/app_protect/tmp/nginx-plus-module-appprotect.pp -m /opt/app_protect/tmp/nginx-plus-module-appprotect.mod
106+
command: "semodule_package -o {{ app_protect_tempdir }}/nginx-plus-module-appprotect.pp -m {{ app_protect_tempdir }}/nginx-plus-module-appprotect.mod"
107107
args:
108-
creates: /opt/app_protect/tmp/nginx-plus-module-appprotect.pp
108+
creates: "{{ app_protect_tempdir }}/nginx-plus-module-appprotect.pp"
109109
changed_when: false
110110

111111
- name: "(Install: SELinux: Module) Import NGINX Plus App Protect Module"
112-
command: semodule -i /opt/app_protect/tmp/nginx-plus-module-appprotect.pp
112+
command: "semodule -i {{ app_protect_tempdir }}/nginx-plus-module-appprotect.pp"
113113
changed_when: false
114114

115115
- name: "(Install: SELinux: Module) Create NGINX Plus Metrics Module"
116116
template:
117117
src: nginx-plus-module-f5-metrics.te.j2
118-
dest: /opt/app_protect/tmp/nginx-plus-module-f5-metrics.te
118+
dest: "{{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.te"
119119

120120
- name: "(Install: SELinux: Module) Check NGINX Plus Metrics Module"
121-
command: checkmodule -M -m -o /opt/app_protect/tmp/nginx-plus-module-f5-metrics.mod /opt/app_protect/tmp/nginx-plus-module-f5-metrics.te
121+
command: "checkmodule -M -m -o {{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.mod {{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.te"
122122
args:
123-
creates: /opt/app_protect/tmp/nginx-plus-module-f5-metrics.mod
123+
creates: "{{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.mod"
124124
changed_when: false
125125

126126
- name: "(Install: SELinux: Module) Compile NGINX Plus Metrics Module"
127-
command: semodule_package -o /opt/app_protect/tmp/nginx-plus-module-f5-metrics.pp -m /opt/app_protect/tmp/nginx-plus-module-f5-metrics.mod
127+
command: "semodule_package -o {{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.pp -m {{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.mod"
128128
args:
129-
creates: /opt/app_protect/tmp/nginx-plus-module-f5-metrics.pp
129+
creates: "{{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.pp"
130130
changed_when: false
131131

132132
- name: "(Install: SELinux: Module) Import NGINX Plus Metrics Module"
133-
command: semodule -i /opt/app_protect/tmp/nginx-plus-module-f5-metrics.pp
133+
command: "semodule -i {{ app_protect_tempdir }}/nginx-plus-module-f5-metrics.pp"
134134
changed_when: false
135135

136136
- name: "(Install: SELinux) Enforce SELinux"

0 commit comments

Comments
 (0)