Skip to content

Instantly share code, notes, and snippets.

@aweiteka
Created September 13, 2017 18:46
Show Gist options
  • Save aweiteka/35612d1f1f59bfab047cddb977ec5498 to your computer and use it in GitHub Desktop.
Save aweiteka/35612d1f1f59bfab047cddb977ec5498 to your computer and use it in GitHub Desktop.
Ansible inventory to manage multiple OpenShift clusters
# NOTE: each 'hostname' needs to be unique
# but they are simply arbitrary names for each cluster
[dev]
dev ansible_connection=local gather_facts=no
[stage]
stage ansible_connection=local gather_facts=no
[prod]
prod ansible_connection=local gather_facts=no
[dev:vars]
clusterhost=https://dev.example.com:8443
token=FIXME_TOKEN
oc=oc --insecure-skip-tls-verify=true --token={{ token }} --server={{ clusterhost }}
[stage:vars]
clusterhost=https://stage.example.com:8443
token=FIXME_TOKEN
oc=oc --insecure-skip-tls-verify=true --token={{ token }} --server={{ clusterhost }}
[prod:vars]
clusterhost=https://prod.example.com:8443
token=FIXME_TOKEN
oc=oc --token={{ token }} --server={{ clusterhost }}
[nonproduction:children]
dev
stage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment