File tree Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Expand file tree Collapse file tree 3 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ BUG FIXES:
17
17
* Prevent TravisCI from trying to build (and failing) NGINX Plus images on external PRs.
18
18
* Fix naming for SELinux Ansible facts.
19
19
* Correctly import ` app_protect ` global directives in template.
20
+ * Role now runs correctly when using Ansible's check mode.
20
21
21
22
## 0.2.0 (September 24, 2020)
22
23
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : (Handler - NGINX Config) Check NGINX
3
3
command : nginx -t
4
- register : config
4
+ register : config_check
5
5
ignore_errors : yes
6
+ check_mode : no
6
7
changed_when : false
7
8
listen : (Handler - NGINX Config) Run NGINX
8
9
9
10
- name : (Handler - NGINX Config) Print NGINX error if syntax check fails
10
11
debug :
11
- var : config.stderr_lines
12
- failed_when : config.rc != 0
13
- when : config.rc != 0
12
+ var : config_check.stderr_lines
13
+ failed_when : config_check.rc != 0
14
+ when :
15
+ - config_check.stderr_lines is defined
16
+ - config_check.rc != 0
14
17
listen : (Handler - NGINX Config) Run NGINX
15
18
16
19
- name : (Handler - NGINX Config) Start/reload NGINX
Original file line number Diff line number Diff line change 1
1
---
2
2
- name : Register NGINX config
3
3
command : nginx -T
4
+ ignore_errors : " {{ ansible_check_mode }}"
5
+ check_mode : no
4
6
changed_when : false
5
- register : config
7
+ register : config_full
6
8
7
9
- name : Print NGINX config
8
10
debug :
9
- var : config.stdout_lines
11
+ var : config_full.stdout_lines
12
+ when : config_full.stdout_lines is defined
You can’t perform that action at this time.
0 commit comments