Inventory and Variables
Introduction
This document describes the configuration Variables and Inventory for your OTH playbook installation.
This document is meant as a reference to how an inventory configuration file can be setup.
We strongly encourage you to read through this document, before generating a configuration for your OTH platform - with the OTH web configuration tool
.
Variables
Purpose:
The all:vars:
configuration holds variables that is in the global scope for an OTH installation, to support the deployment logic. Some of these variables only applies to OTH managed deployments.
key configuration
region:
Specify which AWS region where the OTH environment is deployed.
account:
Key is relevant for OTH managed deployments only.
vpc:
Specify in which VPC where the OTH environment is deployed.
reboot:
Reboot server after auto security patching is applied.
reboot_time:
When should the reboot occur.
timezone:
Specify the Linux Timezone where the servers are located.
customer:
The customer value is provided by OTH technical staff and identifies the customer internally to the OTH infrastructure.
stage:
The stage value is provided by OTH technical staff and identifies the customer internally to the OTH infrastructure. Usually this would be [prod|test|demo|dev|stag]
to identify the type of installation.
ssh_sources:
List of IP addresses or ranges of IP addresses that are allowed to ssh to the servers. This will be used on each servers IPTABLES chain.
Example configuration:
all:
vars:
region: eu-west-1
account: dev
vpc: dev
reboot: True
reboot_time: 03:00
timezone: Europe/Copenhagen
customer: oth
stage: staging
ssh_sources:
- 172.16.0.0/24
- 172.16.5.0/24
inventory
Purpose:
The all:children:
configuration defines which servers should be used for each
host types (e.g. load-balancer, application server, storage server). Global
variables can be overridden from their set value from the all:vars:
section
for each individual host type.
key configuration
all:children:<host type>:<host>:
host type
can be of value [loadbalancers|applicationservers|storageservers]
host
can be of value [IP addresse|hostname]
ansible_user:
the user on the hosts that should be used to deploy the ansible playbook.
Example configuration:
all:
children:
loadbalancers:
hosts:
lb01-a.staging.oth.dev.eu-west-1:
ansible_user: deployer
applicationservers:
hosts:
app01-a.staging.oth.dev.eu-west-1:
ansible_user: deployer
reboot_time: 03:30
storageservers:
hosts:
db01-a.staging.oth.dev.eu-west-1:
ansible_user: deployer