Skip to content

Commit 3bc0160

Browse files
Change mpivars.sh to work if no mpi is present
1 parent 6228aec commit 3bc0160

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

playbooks/roles/mpivars/tasks/ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
stat:
1212
path: /usr/mpi/gcc/{{ openmpi.stdout_lines[0] }}/bin/mpivars.sh
1313
register: mpivars
14-
when: openmpi.stdout_lines[0] != ""
14+
when: openmpi.stdout_lines | length > 0
1515

1616

1717
- name: Create mpivars.sh
@@ -22,4 +22,4 @@
2222
force: yes
2323
owner: root
2424
group: root
25-
when: openmpi.stdout_lines[0] != "" and not mpivars.stat.exists
25+
when: openmpi.stdout_lines | length > 0 and not mpivars.stat.exists

0 commit comments

Comments
 (0)