Skip to content
Permalink
Browse files

Add a note about required bool filter

  • Loading branch information...
bocharsky-bw committed Aug 28, 2019
1 parent 4cc5d67 commit 6c88c35953d103dd6add4cd6d6c263d41e092115
Showing with 17 additions and 0 deletions.
  1. +17 −0 knpu/when-changed.md
@@ -32,6 +32,23 @@ Down below, under "Install Composer's Dependencies", add `when: code_changed`:

[[[ code('acd4c0ebbd') ]]]

***TIP
Ansible does not allow evaluating bare variables anymore. The `code_changed` variable is not
obviously a boolean value because it just references to another variable called `repo_code.changed`,
so Ansible requires the `|bool` filter to be added to the `code_changed` in `when` clauses:
```yaml
---
- hosts: vb
# ...
tasks:
# ...
- name: Install Composer's dependencies
# ...
when: code_changed | bool
```
***
Ah, so nice. Copy that and put it anywhere else it makes sense like "Execute migrations"
and "Clear Cache":

0 comments on commit 6c88c35

Please sign in to comment.
You can’t perform that action at this time.