Updated hosts.yml to support new inventory syntax

While reworked group structure to be more useful and powerful
master
Felix Stupp 4 years ago
parent 827865b44c
commit 7d858342e2
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -1,41 +1,85 @@
# Public Servers version: 2
hatoria.banananet.work: groups: # a:b meaning b is a, can be nested
- hetzner_server
- os_debian # hardware structure
- bootstrap dev_known:
- public_available barebones:
- wireguard_backbones - rented_barebones # sub group
# list of all known barebone device groups
nvak.banananet.work: - dev_surface3 # Microsoft Surface 3
- contabo_vserver virtual:
- os_debian - rented_vserver # sub group
- bootstrap dev_unknown: # for unknown device kinds
- public_available
- wireguard_backbones # structure of rented servers
rented:
morska.banananet.work: rented_barebones:
- bwcloud_vserver - hetzner_server # https://robot.your-server.de/server
- os_debian rented_vserver:
- bootstrap - bwcloud_vserver # https://portal.bw-cloud.org/
- public_available - contabo_vserver # https://my.contabo.com/vps
- wireguard_backbones
# OS structure
rurapenthe.banananet.work: os_known: # list of all known OS derivates
- bwcloud_vserver - os_debian
- os_debian - os_raspbian
- bootstrap
- public_available # applications
- wireguard_backbones
bootstrapable: # which OSes/hosts can be bootstraped
# Location Eridon - os_debian
- os_raspbian
## Local Servers
hardie.eridon.banananet.work:
- bootstrap group_aliasses: # a:b meaning a equals b, should only depend on groups not defined here
## Embedded Devices # unknown groups
wgpanel.eridon.banananet.work: dev_unknown: "!dev_known"
- dev_surface3 os_unknown: "!os_known"
- os_debian
- bootstrap # applications
bootstrap: "bootstrapable:!no_bootstrap" # which hosts should be bootstraped
common_roles: "!no_common_roles"
wireguard_backbones: "public_available:!no_wireguard_automatic"
wireguard_clients: "!public_available:!no_wireguard_automatic"
host_groups: # group: host: [*groups]
no_defaults: # do not include in all default playbooks / roles
_all:
- no_bootstrap # do not setup sudo bootstrap
- no_common_roles # do not include in common roles
- no_wireguard_automatic # do not assign wireguard role automatic, hosts may be excluded from wireguard or assigned to their wireguard role manually
rented:
_all:
- public_available # rented are public available
# to group similar devices together
common_server: # public common servers
_all:
- os_debian
hatoria.banananet.work:
- hetzner_server
nvak.banananet.work:
- contabo_vserver
morska.banananet.work:
- bwcloud_vserver
rurapenthe.banananet.work:
- bwcloud_vserver
single_hosts: # a:b meaning a is b, cannot be nested
# Local Servers
hardie.eridon.banananet.work:
- os_debian
# Embedded Devices
wgpanel.eridon.banananet.work:
- dev_surface3
- os_debian
- no_wireguard_automatic # no wireguard

@ -12,7 +12,7 @@
- role: bootstrap - role: bootstrap
- name: Configure common roles expected by others - name: Configure common roles expected by others
- hosts: all hosts: common_roles
roles: roles:
- role: hostname - role: hostname
fqdn: "{{ inventory_hostname }}" fqdn: "{{ inventory_hostname }}"
@ -27,7 +27,7 @@
sudo: yes sudo: yes
# Enroll certain features not on ansible test/debug servers # Enroll certain features not on ansible test/debug servers
- hosts: all:!ansible_debug - hosts: common_roles:!ansible_debug
roles: roles:
- role: misc/ssh_tg_notify - role: misc/ssh_tg_notify
recipient_id: "{{ zocker_telegram_id }}" recipient_id: "{{ zocker_telegram_id }}"

Loading…
Cancel
Save