Skip to content

Commit 7c3ca85

Browse files
authored
Fix configs cleanup (#19)
1 parent ad17389 commit 7c3ca85

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,16 @@
44

55
ENHANCEMENTS:
66

7-
* Update Ansible to `2.9.12` and Ansible Lint to `4.3.3`.
7+
* Update Ansible to `2.9.13` and Ansible Lint to `4.3.4`.
88
* Explicitly defined `mode` in relevant tasks.
99
* Improve configuration templating capabilities:
1010
* Allow setting `access_log`/`access_log_location` to `off`.
1111
* Add IP restriction for web servers
1212

13+
BUG FIXES:
14+
15+
* An empty `nginx_config_cleanup_files` will no longer cause `nginx_config_cleanup` related tasks to fail.
16+
1317
## 0.1.0 (August 19, 2020)
1418

1519
Initial release of the NGINX Config role. Contains all NGINX Config related features previously available on the [NGINX Ansible role](https://github.com/nginxinc/ansible-role-nginx).

defaults/main/main.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ nginx_config_modules:
1717
rtmp: false
1818
xslt: false
1919

20-
# Remove previously existing NGINX configuration files.
20+
# Remove previously existing NGINX configuration files (files ending in *.conf).
2121
# You can specify a list of paths you wish to remove.
2222
# You can also choose whether to recurse through the paths specified.
2323
# Alternatively you can specify the list of files you wish to remove.
2424
# Default is false.
2525
nginx_config_cleanup: false
26-
nginx_config_cleanup_paths:
27-
- directory:
28-
- /etc/nginx/conf.d
29-
recurse: false
26+
# nginx_config_cleanup_paths:
27+
# - directory:
28+
# - /etc/nginx/conf.d
29+
# recurse: false
3030
# nginx_config_cleanup_files:
3131
# - /etc/nginx/conf.d/default.conf

tasks/conf/cleanup-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
state: absent
1515
loop: >-
1616
{{ nginx_config_files.results | default('') | map(attribute='files') | sum(start=[]) | map(attribute='path') | list
17-
+ nginx_config_cleanup_files | default('') }}
17+
+ nginx_config_cleanup_files | default('') | list }}

0 commit comments

Comments
 (0)