Skip to content

Commit d8d7179

Browse files
committed
moved to handlers
1 parent 81c23b2 commit d8d7179

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

handlers/main.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@
33
- name: "(Handler: All OSs) Run NGINX"
44
block:
55

6-
- name: "(Handler: All OSs) Set App Protect Permissions"
7-
file:
8-
path: /opt/app_protect
9-
owner: nginx
10-
group: nginx
11-
recurse: yes
12-
136
- name: "(Handler: All OSs) Start NGINX"
147
service:
158
name: nginx
@@ -30,3 +23,7 @@
3023
- name: "(Handler: All OSs) Check NGINX"
3124
command: "nginx -t"
3225
changed_when: false
26+
27+
- name: "(Handler: All OSs) Enable SELinux"
28+
include_tasks: configure-selinux.yml
29+
notify: "(Handler: All OSs) Restart NGINX"

tasks/prerequisites/setup-selinux.yml renamed to tasks/configure-selinux.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
creates: "{{ app_protect_tempdir }}/nginx-plus-module-appprotect.pp"
110110
changed_when: false
111111

112-
- name: "(Install: SELinux: Module) Import NGINX Plus App Protect Module"
112+
- name: "(Install: SELinux: Module) Import NGINX Plus App Protect Module" # noqa 503
113113
command: "semodule -i {{ app_protect_tempdir }}/nginx-plus-module-appprotect.pp"
114114
changed_when: false
115115
when: app_protect_module.changed
@@ -118,4 +118,4 @@
118118
selinux:
119119
state: enforcing
120120
policy: targeted
121-
changed_when: false
121+
changed_when: false

tasks/prerequisites/setup-centos.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
state: present
66

77
- name: "(Install: CentOS) Setup SELinux"
8-
import_tasks: setup-selinux.yml
8+
command: /bin/true
9+
notify: "(Handler: All OSs) Enable SELinux"
910
when: app_protect_selinux

0 commit comments

Comments
 (0)