Skip to content

Commit 55b4b34

Browse files
committed
use etc_hosts role rather than hook in lab
1 parent 5bf8535 commit 55b4b34

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

environments/lab/hooks/pre.yml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
- name: NREL lab fixes - Workaround no internal DNS
2-
hosts: all
3-
become: true
4-
gather_facts: false
5-
tags: etc_hosts
6-
tasks:
7-
- name: Create /etc/hosts for all nodes as DNS doesn't work
8-
# the interface used as ansible_host is defined by terraform's `access_network` parameter, so this is deterministic for multi-rail hosts
9-
blockinfile:
10-
path: /etc/hosts
11-
create: yes
12-
state: present
13-
block: |
14-
{% for hostname in groups['all'] %}
15-
{{ hostvars[hostname]['ansible_host'] }} {{ hostname }}
16-
{% endfor %}
17-
181
- name: NREL lab fixes - For compute nodes
192
hosts: compute
203
become: true
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Don't have os_manila for lab so fake it using NFS
22
[nfs:children]
33
openhpc
4+
5+
# Don't have working internal DNS
6+
[etc_hosts:children]
7+
cluster

0 commit comments

Comments
 (0)