File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
molecule/common/playbooks Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -94,13 +94,16 @@ nginx_modules:
94
94
95
95
# Remove previously existing NGINX configuration files.
96
96
# You can specify a list of paths you wish to remove.
97
- # Alternatively you can also choose whether to recurse through the paths specified.
97
+ # You can also choose whether to recurse through the paths specified.
98
+ # Alternatively you can specify the list of files you wish to remove.
98
99
# Default is false.
99
100
nginx_cleanup_config : false
100
- nginx_cleanup_config_path :
101
+ nginx_cleanup_config_paths :
101
102
- directory :
102
103
- /etc/nginx/conf.d
103
104
recurse : false
105
+ # nginx_cleanup_config_files:
106
+ # - /etc/nginx/conf.d/default.conf
104
107
105
108
# Set selinux enforcing for nginx (Centos/Redhat only) - you may need to open ports on your own
106
109
nginx_selinux : false
Original file line number Diff line number Diff line change 14
14
- 443
15
15
16
16
nginx_cleanup_config : true
17
- nginx_cleanup_config_path :
17
+ nginx_cleanup_config_paths :
18
18
- directory :
19
19
- /etc/nginx/conf.d
20
20
recurse : false
21
+ nginx_cleanup_config_files :
22
+ - /etc/nginx/conf.d/default.conf
21
23
22
24
nginx_modules :
23
25
njs : true
Original file line number Diff line number Diff line change 4
4
paths : " {{ item.directory }}"
5
5
patterns : " *.conf"
6
6
recurse : " {{ item.recurse | default(false) }}"
7
- loop : " {{ nginx_cleanup_config_path }}"
7
+ loop : " {{ nginx_cleanup_config_paths }}"
8
+ when : nginx_cleanup_config_paths is defined
8
9
register : nginx_config_files
9
10
10
11
- name : " (Setup: All OSs) Remove NGINX Configuration Files"
11
12
file :
12
13
path : " {{ item }}"
13
14
state : absent
14
- loop : " {{ nginx_config_files.results | map(attribute='files') | sum(start=[]) | map(attribute='path') | list }}"
15
+ loop : >-
16
+ {{ nginx_config_files.results | default('') | map(attribute='files') | sum(start=[]) | map(attribute='path') | list
17
+ + nginx_cleanup_config_files | default('') }}
You can’t perform that action at this time.
0 commit comments