Commit 97614a0
committed
Fix boolean conditionals in when clauses for Ansible 2.19+ compatibility
Ansible 2.19 enforces that all 'when' conditions must evaluate to an
explicit boolean. Bare string values (e.g. non-empty cert content) are
truthy but not boolean, causing the error:
'Conditional result (True) was derived from value of type str.
Conditionals must have a boolean result.'
Replace bare .content attribute checks with '| length > 0' in three
tasks:
- Copy Libvirt TLS certificates and keys
- Copy QEMU TLS certificates and keys
- Copy Libvirt VNC TLS certificates and keys
Ref: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_conditionals.html1 parent 23f69e4 commit 97614a0
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
162 | | - | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| |||
0 commit comments