-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsulClient.yml
More file actions
35 lines (30 loc) · 1008 Bytes
/
consulClient.yml
File metadata and controls
35 lines (30 loc) · 1008 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
---
- hosts: consulClient
sudo: true
pre_tasks:
- name: debug
debug: "debug"
- name: add dns
sudo: yes
command: echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
- name: update apt
sudo: yes
apt: update_cache=yes
roles:
- { role : bastly.consul, sudo: yes }
vars:
consul_version: 0.5.0
consul_install_dnsmasq: false
consul_is_ui: false
consul_is_server: false
consul_bootstrap: false
consul_datacenter: "BastlyInfra"
consul_node_name: "{{inventory_hostname}}"
consul_servers: ["{{ hostvars['consul1'][private_net_interface]['ipv4']['address'] }}"]
consul_bind_address: "{{ hostvars[inventory_hostname][private_net_interface]['ipv4']['address'] }}"
consul_advertise_address: "{{ hostvars[inventory_hostname]['ansible_ssh_host'] }}"
consul_join_at_start: true
# configure service
consul_log_level: "INFO"
consul_rejoin_after_leave: "true"
consul_leave_on_terminate: "false"