浏览代码

working on changes, and debugging

master
erin sims 2 年前
父节点
当前提交
d1806d8405
共有 3 个文件被更改,包括 27 次插入114 次删除
  1. +0
    -109
      hosts
  2. +1
    -5
      playbooks/digitalocean.yaml
  3. +26
    -0
      playbooks/do_hosts.yml

+ 0
- 109
hosts 查看文件

@@ -1,109 +0,0 @@
athena ansible_host=167.71.188.165
Zeus ansible_host=68.183.50.72
Hades ansible_host=104.131.0.100
Atreyu ansible_host=159.65.178.119
mpdf1 ansible_host=159.203.118.212
mpdf2 ansible_host=45.55.57.172
mpdb1 ansible_host=142.93.181.29
mpdb2 ansible_host=134.209.37.25

[ams1]

[ams2]

[ams3]

[blr1]

[fra1]

[lon1]

[nyc1]

[nyc2]

[nyc3]
athena
Zeus
Hades
Atreyu
mpdf1
mpdf2
mpdb1
mpdb2

[sfo1]

[sfo2]

[sfo3]

[sgp1]

[tor1]

[salt_minon]
Hades

[mpdb]
mpdb1
mpdb2

[consul]
athena
Hades

[prometheus]
athena

[matrix]
athena

[synapse]
athena

[Saltmaster]
Zeus

[nextcloud]
Zeus

[alertmanager]
athena

[ansible]
athena
Atreyu
mpdf1
mpdf2
mpdb1
mpdb2

[www_apache]
Zeus

[controller]
Atreyu

[mpdf]
mpdf1
mpdf2

[salt_minion]
athena
Zeus

[Git]
Zeus

[Thrace_Test]
mpdb2
mpdb1
mpdf2
mpdf1
Atreyu
Hades
Zeus
athena


+ 1
- 5
playbooks/digitalocean.yaml 查看文件

@@ -14,10 +14,7 @@ attributes:
- tags
- region
keyed_groups:
- key: do_region.slug
prefix: 'region'
separator: '_'
- key: do_tags | lower
- key: do_tags | lower
prefix: ''
separator: ''
compose:
@@ -27,4 +24,3 @@ compose:
distro: do_image.distribution | lower
filters:
- '"ansible" in do_tags'
- 'do_region.slug == "nyc1"'

+ 26
- 0
playbooks/do_hosts.yml 查看文件

@@ -0,0 +1,26 @@
# Using keyed groups and compose for hostvars
plugin: community.digitalocean.digitalocean
api_token: "{{ lookup('ansible.builtin.env', 'DO_API_TOKEN') }}"
attributes:
- id
- name
- memory
- vcpus
- disk
- size
- image
- networks
- volume_ids
- tags
- region
keyed_groups:
- key: do_tags | lower
prefix: ''
separator: ''
compose:
ansible_host: do_networks.v4 | selectattr('type','eq','public')
| map(attribute='ip_address') | first
class: do_size.description | lower
distro: do_image.distribution | lower
filters:
- '"ansible" in do_tags'

正在加载...
取消
保存