File tree Expand file tree Collapse file tree 5 files changed +21
-22
lines changed Expand file tree Collapse file tree 5 files changed +21
-22
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,11 @@ nginx_modules:
86
86
xslt : false
87
87
88
88
# Remove previously existing NGINX configuration files.
89
- # Use a list of paths you wish to remove.
89
+ # You can specify a list of paths you wish to remove.
90
+ # Alternatively you can also choose whether to recurse through the paths specified.
90
91
# Default is false.
91
92
nginx_cleanup_config : false
92
93
nginx_cleanup_config_path :
93
- - /etc/nginx/conf.d
94
+ - directory :
95
+ - /etc/nginx/conf.d
96
+ recurse : false
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
vars :
7
7
nginx_debug_output : true
8
8
9
+ nginx_cleanup_config : true
10
+ nginx_cleanup_config_path :
11
+ - directory :
12
+ - /etc/nginx/conf.d
13
+ recurse : false
14
+
9
15
nginx_modules :
10
16
njs : true
11
17
perl : true
Original file line number Diff line number Diff line change @@ -22,9 +22,3 @@ def test_hosts_file(host):
22
22
assert ngx .exists
23
23
assert ngx .user == 'root'
24
24
assert ngx .group == 'root'
25
-
26
-
27
- def test_endpoint (host ):
28
- command = """curl -I http://localhost/"""
29
- cmd = host .run (command )
30
- assert '200 OK' in cmd .stdout
Original file line number Diff line number Diff line change 1
1
---
2
- - name : " (Setup: All OSs) Remove NGINX configuration files"
2
+ - name : " (Setup: All OSs) Find NGINX Configuration Files"
3
+ find :
4
+ paths : " {{ item.directory }}"
5
+ patterns : " *.conf"
6
+ recurse : " {{ item.recurse | default(false) }}"
7
+ loop : " {{ nginx_cleanup_config_path }}"
8
+ register : nginx_config_files
9
+
10
+ - name : " (Setup: All OSs) Remove NGINX Configuration Files"
3
11
file :
4
12
path : " {{ item }}"
5
13
state : absent
6
- with_items :
7
- - " {{ nginx_cleanup_config_path }}"
8
- notify : " (Handler: All OSs) Reload NGINX"
14
+ loop : " {{ nginx_config_files.results | map(attribute='files') | sum(start=[]) | map(attribute='path') | list }}"
You can’t perform that action at this time.
0 commit comments