Skip to content

Commit 51494f7

Browse files
authored
Merge pull request #619 from Spirit-act/broken-conditionals
fix: use explicit bool instead of implicit truthy
2 parents d3d4e9a + d17ac8a commit 51494f7

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

roles/_common/tasks/configure.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
become: true
3434
notify:
3535
- "{{ ansible_parent_role_names | first }} : Restart {{ _common_service_name }}"
36-
when: (_common_config_dir)
36+
when: (_common_config_dir | length > 0)
3737
tags:
3838
- "{{ ansible_parent_role_names | first | regex_replace(ansible_collection_name ~ '.', '') }}"
3939
- configure

roles/_common/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
- name: "Verify checksum of {{ __common_binary_basename }}"
8282
run_once: true
8383
check_mode: false
84-
when: (_common_checksums_url)
84+
when: (_common_checksums_url | length > 0)
8585
block:
8686
- name: "Fetch checksum list for {{ __common_binary_basename }}"
8787
ansible.builtin.uri:

roles/_common/tasks/preflight.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
ansible.builtin.package:
5858
name: "{{ _common_dependencies }}"
5959
state: present
60-
when: (_common_dependencies)
60+
when: (_common_dependencies != None)
6161
tags:
6262
- "{{ ansible_parent_role_names | first | regex_replace(ansible_collection_name ~ '.', '') }}"
6363
- configure
@@ -84,4 +84,4 @@
8484
reject('match', '.+:\\d+$') |
8585
list |
8686
length == 0
87-
when: (_common_web_listen_address)
87+
when: (_common_web_listen_address | length > 0)

0 commit comments

Comments
 (0)