Skip to content

Commit ec2c6d2

Browse files
authored
Fix nginx_config_cleanup_paths not working as intended (#99)
1 parent 3f07a29 commit ec2c6d2

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ BUG FIXES:
5858
* Add `state` parameter to package module in Molecule verification tests.
5959
* In NGINX App Protect environments on SELinux enforced systems, the `nginx -t` handler fails when run from a directory that the NGINX process' user does not have access to.
6060
* Fix missing GRPC boolean check in GRPC template.
61+
* Fix `nginx_config_cleanup_paths` not working as intended.
6162

6263
## 0.3.3 (January 28, 2021)
6364

molecule/cleanup_module/prepare.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@
88
vars:
99
nginx_modules:
1010
- njs
11+
12+
- name: Create mock NGINX configuration file
13+
file:
14+
path: /etc/nginx/conf.d/mock.conf
15+
state: touch

molecule/cleanup_module/verify.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,10 @@
2525
check_mode: yes
2626
register: stat_result
2727
failed_when: stat_result.stat.exists
28+
29+
- name: Check mock.conf does not exist
30+
stat:
31+
path: /etc/nginx/conf.d/mock.conf
32+
check_mode: yes
33+
register: stat_result
34+
failed_when: stat_result.stat.exists

tasks/config/cleanup-config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
file:
1313
path: "{{ item }}"
1414
state: absent
15-
loop: "{{ nginx_config_files.files | default('') | map(attribute='path') |
16-
list + nginx_config_cleanup_files | default('') | list }}"
15+
loop: "{{ nginx_config_files.results | map(attribute='files') | sum(start=[]) | map(attribute='path') | list
16+
+ nginx_config_cleanup_files | default('') | list }}"
1717
notify: (Handler - NGINX Config) Run NGINX

0 commit comments

Comments
 (0)