We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3bc0160 commit ae7609fCopy full SHA for ae7609f
playbooks/roles/etc-hosts/tasks/common.yml
@@ -60,6 +60,14 @@
60
force: yes
61
when: ( not destroy|bool ) and (('slurm_backup' in group_names) or ('login' in group_names))
62
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
+
71
- name: move /etc/hosts on all compute nodes
72
become: true
73
copy:
0 commit comments