Skip to content

Commit 782c2f5

Browse files
authored
Fix Ansible assert boolean condition for RPM detection (#949)
* Update install.yml Fix Ansible assert to use boolean condition for RPM check * invalid Python/Jinja logic and with Ansible ≥2.15 strict conditionals
1 parent e32e60e commit 782c2f5

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

ansible/fatimage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
ansible.builtin.include_role:
153153
name: openondemand
154154
tasks_from: vnc_compute.yml
155-
when: "'openondemand_desktop' or 'openondemand_matlab' in group_names"
155+
when: "'openondemand_desktop' in group_names or 'openondemand_matlab' in group_names"
156156

157157
- name: Open OnDemand Jupyter node
158158
ansible.builtin.include_role:

ansible/roles/lustre/tasks/install.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434

3535
- name: Check rpms found
3636
ansible.builtin.assert:
37-
that: _lustre_find_rpms.files | length
37+
that:
38+
- _lustre_find_rpms.matched > 0
3839
fail_msg: "No lustre repos found with lustre_rpm_globs = {{ lustre_rpm_globs }}"
3940

4041
- name: Install lustre rpms

0 commit comments

Comments
 (0)