generated from HariSekhon/Template-Repo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinventory.ini
More file actions
72 lines (60 loc) · 1.68 KB
/
inventory.ini
File metadata and controls
72 lines (60 loc) · 1.68 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#
# Author: Hari Sekhon
# Date: 2023-05-31 06:14:44 +0100 (Wed, 31 May 2023)
# Original Date: 2014-07-16 22:01:44 +0100 (Wed, 16 Jul 2014)
#
# # filetype=ini doesn't syntax highlight # comments
# vim:ts=2:sts=2:sw=2:et:filetype=conf
#
# https://github.com/HariSekhon/Ansible
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# A n s i b l e I n v e n t o r y
# ============================================================================ #
# Static inventory for getting running quickly
# Patterns:
#
# '*' # wildcards
# all
# 192.168.0.*
# *.domain.com
# *.domain.com:group1 # mix-and-match wildcards and groups
# group1:group2 # OR
# group1:!group2 # except group2
# group1:&group2 # intersection
# group1:group2:&group3:!group4 # groups 1 or 2 if also in group3 but not in group 4
# ~group1 # regex
# group1[0] # subscript - first host in group1
[cluster:children]
masters
nodes
[masters]
masters[1:2]
[nodes]
nodes[1:18]
[webservers:children]
dc1_webservers
dc2_webservers
[dc1_webservers]
www1
www2
www3
[dc2_webservers]
www1
www2
www3
# not used for proxying, this is done in the nodes:vars config below
[proxy]
bastion.example.com
[nodes]
private-server-1.example.com
private-server-2.example.com
private-server-3.example.com
[nodes:vars]
ansible_ssh_common_args='-o ProxyCommand="ssh -p 2222 -W %h:%p -q username@bastion.example.com"'