-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathhost-groups-file-example
33 lines (26 loc) · 1.38 KB
/
host-groups-file-example
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
#!/usr/bin/env bash
# The host groups file is intended to be able to be used by Bash scripts in addition to Octopus. In
# fact, Octopus will not be able to parse the host groups file if the group entries are not in a
# Bash variable declaration. Variables must be exported for Octopus to see them as host groups.
# A sample list of host groups for a theoretical Kubernetes cluster is shown below. In this
# example, the internal cluster network is 172.24.0.0/16, and the internet-facing (public) network
# is 192.168.0.0/16
# In this example, the primary place to run Octopus is from the admin node
export admin="172.24.1.1"
# We may also run it from a laptop, but we will be limited to executing on public nodes
export admin_public="192.168.101.1"
# Definitions must begin with (including either a single- or double-quote): <variable_name>=["']
export masters="172.24.2.1 172.24.2.2 172.24.2.3"
export masters_public="192.168.102.1 192.168.102.2 192.168.102.3"
# Definitions do not need to be on a single line as long as there is a quote following the equal
export nodes='
172.24.3.1
172.24.3.2
172.24.3.3
172.24.3.4
172.24.3.5'
# nodes do not have an internet-facing network in this example
# Deinitions may include previous definitions as variables just as one could do in Bash
export all="${admin} ${masters} ${nodes}"
export all_public="${admin_public} ${masters_public}"
export k8s="${masters} ${nodes}"