Skip to content

Commit ae7609f

Browse files
Fix issue with IPV6 on backup and login nodes
1 parent 3bc0160 commit ae7609f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

playbooks/roles/etc-hosts/tasks/common.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@
6060
force: yes
6161
when: ( not destroy|bool ) and (('slurm_backup' in group_names) or ('login' in group_names))
6262

63+
- name: Make sure the IP for each node was not left over in another cluster
64+
become: true
65+
lineinfile:
66+
dest: /etc/hosts
67+
regexp: "^127.0.1.1\\s{{hostvars[groups['bastion'][0]]['inventory_hostname']}}.*"
68+
state: absent
69+
when: ( not destroy|bool ) and (('slurm_backup' in group_names) or ('login' in group_names))
70+
6371
- name: move /etc/hosts on all compute nodes
6472
become: true
6573
copy:

0 commit comments

Comments
 (0)