2016-03-04 11:20:53 +01:00
|
|
|
# Rename always_run to ignore_checkmode
|
2016-03-02 11:09:47 +01:00
|
|
|
|
|
|
|
*Author*: René Moser <@resmo>
|
|
|
|
|
|
|
|
*Date*: 02/03/2016
|
|
|
|
|
|
|
|
## Motivation
|
|
|
|
|
|
|
|
The task argument `always_run` is misleading.
|
|
|
|
|
|
|
|
Ansible is known to be readable by users without deep knowledge of creating playbooks, they do not understand
|
|
|
|
what `always_run` does at the first glance.
|
|
|
|
|
|
|
|
### Problems
|
|
|
|
|
|
|
|
The following looks scary if you have no idea, what `always_run` does:
|
|
|
|
|
|
|
|
```
|
|
|
|
- shell: dangerous_cleanup.sh
|
|
|
|
when: cleanup == "yes"
|
|
|
|
always_run: yes
|
|
|
|
```
|
|
|
|
|
|
|
|
You have a conditional but also a word that says `always`. This is a conflict in terms of understanding.
|
|
|
|
|
|
|
|
## Solution Proposal
|
|
|
|
|
2016-03-04 11:20:53 +01:00
|
|
|
Deprecate `always_run` by rename it to `ignore_checkmode`:
|
2016-03-02 11:09:47 +01:00
|
|
|
|
|
|
|
```
|
|
|
|
- shell: dangerous_cleanup.sh
|
|
|
|
when: cleanup == "yes"
|
2016-03-04 11:20:53 +01:00
|
|
|
ignore_checkmode: yes
|
2016-03-02 11:09:47 +01:00
|
|
|
```
|