-
Notifications
You must be signed in to change notification settings - Fork 2
/
inventory-constructed.yml
50 lines (37 loc) · 1.13 KB
/
inventory-constructed.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
plugin: ansible.builtin.constructed
# Skip instead of producing an error if a variable is not defined.
# strict: false
# Dynamic group assignment based on facts.
#
# To see the list of hosts in a specific groups:
#
# ansible-inventory --list | jq .hypervisor
groups:
hypervisor: >-
ansible_virtualization_role == 'host'
guest: >-
ansible_virtualization_role == 'guest'
linux: >-
ansible_system == 'Linux'
fedora: >-
ansible_distribution == 'Fedora'
# Only works after ansible.builtin.package_facts was run against the host.
# 'raspberrypi-kernel' in packages
raspi: >-
'snd_bcm2835.enable_hdmi' in ansible_cmdline
build_agents: >-
inventory_hostname is match("agent-*")
kubes: >-
inventory_hostname is match("kube-*")
gateway: >-
inventory_hostname is match("gateway-*")
tasmotas: >-
inventory_hostname is match("gosund-*") or
inventory_hostname is match("nous-*") or
inventory_hostname is match("shelly*")
gosunds: >-
inventory_hostname is match("gosund-*")
nouses: >-
inventory_hostname is match("nous-*")
shellies: >-
inventory_hostname is match("shelly*")