Make sure there's a working DNS server when bootstrapping
This commit is contained in:
parent
fd92573c16
commit
bd35cb1265
@ -1,4 +1,18 @@
|
|||||||
---
|
---
|
||||||
|
- name: Update DNS for bootstrapping with non-Nomad host
|
||||||
|
hosts: consul_instances
|
||||||
|
become: true
|
||||||
|
gather_facts: false
|
||||||
|
vars:
|
||||||
|
non_nomad_dns: 192.168.2.170
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: Add non-nomad bootstrap DNS
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/resolv.conf
|
||||||
|
create: true
|
||||||
|
line: "nameserver {{ non_nomad_dns }}"
|
||||||
|
|
||||||
- name: Build Consul cluster
|
- name: Build Consul cluster
|
||||||
hosts: consul_instances
|
hosts: consul_instances
|
||||||
any_errors_fatal: true
|
any_errors_fatal: true
|
||||||
|
Loading…
Reference in New Issue
Block a user