111
This commit is contained in:
@@ -12,16 +12,18 @@
|
||||
- "100.116.80.94:8300" # ash3c (美国)
|
||||
|
||||
tasks:
|
||||
- name: Update APT cache
|
||||
- name: Update APT cache (忽略 GPG 错误)
|
||||
apt:
|
||||
update_cache: yes
|
||||
force_apt_get: yes
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Install consul via APT (假设源已存在)
|
||||
apt:
|
||||
name: consul={{ consul_version }}-*
|
||||
state: present
|
||||
update_cache: yes
|
||||
register: consul_installed
|
||||
force_apt_get: yes
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Create consul user (if not exists)
|
||||
user:
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
---
|
||||
# Ansible Inventory for Consul Client Deployment
|
||||
all:
|
||||
children:
|
||||
consul_servers:
|
||||
hosts:
|
||||
master.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.117.106.136
|
||||
region: korea
|
||||
warden.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.122.197.112
|
||||
region: beijing
|
||||
ash3c.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.116.80.94
|
||||
region: usa
|
||||
|
||||
nomad_servers:
|
||||
hosts:
|
||||
# Nomad Server 节点也需要 Consul Client
|
||||
semaphore.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.116.158.95
|
||||
region: korea
|
||||
ch3.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.86.141.112
|
||||
region: switzerland
|
||||
ash1d.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.81.26.3
|
||||
region: usa
|
||||
ash2e.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.103.147.94
|
||||
region: usa
|
||||
ch2.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.90.159.68
|
||||
region: switzerland
|
||||
de.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.120.225.29
|
||||
region: germany
|
||||
onecloud1.tailnet-68f9.ts.net:
|
||||
ansible_host: 100.98.209.50
|
||||
region: unknown
|
||||
|
||||
nomad_clients:
|
||||
hosts:
|
||||
# 需要部署 Consul Client 的节点
|
||||
influxdb1.tailnet-68f9.ts.net:
|
||||
ansible_host: "{{ influxdb1_ip }}" # 需要填入实际IP
|
||||
region: beijing
|
||||
browser.tailnet-68f9.ts.net:
|
||||
ansible_host: "{{ browser_ip }}" # 需要填入实际IP
|
||||
region: beijing
|
||||
# hcp1 已经有 Consul Client,可选择重新配置
|
||||
# hcp1.tailnet-68f9.ts.net:
|
||||
# ansible_host: 100.97.62.111
|
||||
# region: beijing
|
||||
|
||||
vars:
|
||||
ansible_user: root
|
||||
ansible_ssh_private_key_file: ~/.ssh/id_rsa
|
||||
consul_datacenter: dc1
|
||||
Reference in New Issue
Block a user