Skip to content

Commit 754d3d3

Browse files
Generate hostfiles on bastion for other clusters
1 parent 41f6248 commit 754d3d3

File tree

1 file changed

+4
-15
lines changed

1 file changed

+4
-15
lines changed

playbooks/roles/mpi-hostfiles/tasks/common.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- name: create rdma hostfile
99
template:
1010
src: templates/hostfile_rdma.j2
11-
dest: /tmp/hostfile.rdma.{{ cluster_name }}
11+
dest: /etc/opt/oci-hpc/hostfile.rdma.{{ cluster_name }}
1212
mode: '0644'
1313
owner: "{{ ansible_user }}"
1414
group: "{{ ansible_user }}"
@@ -20,7 +20,7 @@
2020
- name: create tcp hostfile
2121
template:
2222
src: templates/hostfile_tcp.j2
23-
dest: /tmp/hostfile.tcp.{{ cluster_name }}
23+
dest: /etc/opt/oci-hpc/hostfile.tcp.{{ cluster_name }}
2424
mode: '0644'
2525
owner: "{{ ansible_user }}"
2626
group: "{{ ansible_user }}"
@@ -30,13 +30,13 @@
3030

3131
- name: Copy to all hosts
3232
copy:
33-
src: /tmp/hostfile.rdma.{{ cluster_name }}
33+
src: /etc/opt/oci-hpc/hostfile.rdma.{{ cluster_name }}
3434
dest: /etc/opt/oci-hpc/hostfile.rdma
3535
when: cluster_network|bool
3636

3737
- name: Copy to all hosts
3838
copy:
39-
src: /tmp/hostfile.tcp.{{ cluster_name }}
39+
src: /etc/opt/oci-hpc/hostfile.tcp.{{ cluster_name }}
4040
dest: /etc/opt/oci-hpc/hostfile.tcp
4141

4242
- name: Create a symbolic link
@@ -63,15 +63,4 @@
6363
- "hostfile.tcp"
6464
when: not cluster_network|bool
6565

66-
- name: delete /tmp/hostfile.tcp
67-
file:
68-
path: /tmp/hostfile.tcp.{{ cluster_name }}
69-
state: absent
70-
71-
- name: delete /tmp/hostfile.rdma
72-
file:
73-
path: /tmp/hostfile.rdma.{{ cluster_name }}
74-
state: absent
75-
when: cluster_network|bool
76-
7766

0 commit comments

Comments
 (0)