Skip to content

Instantly share code, notes, and snippets.

@arunthampi
Created November 28, 2012 03:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arunthampi/4158907 to your computer and use it in GitHub Desktop.
Save arunthampi/4158907 to your computer and use it in GitHub Desktop.
foobar_config.yml
---
vars_files:
# This will create a file called github_private_key.yml (since the context is set to global)
# and will look like this:
#---
#github_private_key: blabla
#
# bombay will include these vars_files while invoking ansible-playbook
github_private_key:
context: global
vars:
- name: github_key
prompt: Replace this line with the private key used by the box to pull from GitHub repos
multiline: true
# This will create a file called foobar.staging.yml (since the context is set to environment)
# and will look like this:
#---
#foobar_database_username: foo
#foobar_database_password: bar
#
# bombay will include these vars_files while invoking ansible-playbook
foobar:
context: environment
vars:
- name: rainbow_database_username
prompt: The postgres username
- name: rainbow_database_password
prompt: The postgres password
regions:
- region: ap-southeast-1
environments:
staging:
# Vars which are not sensitive but are specific to the environment: staging
host_vars:
rainbow:
- name: cors_allowed_origin
value: https://staging.action.io
- name: socketio_allowed_origin
value: https://staging.action.io:*
# This will create an EC2 instance with the name tagged as blabla-apse1-staging.action.io
# Will create the appropriate DNS records in Route53, set the size to be m1.small
# and use the AMI ami-deadbeef in the ap-southeast-1 region
hosts:
- hostname: foobar-apse1-staging.action.io
size: m1.small
ami: ami-deadbeef
production:
# Vars which are not sensitive but are specific to the environment: production
host_vars:
rainbow:
- name: cors_allowed_origin
value: https://www.action.io
- name: socketio_allowed_origin
value: https://www.action.io:*
# This will create an EC2 instance with the name tagged as foobar-apse1.action.io
# Will create the appropriate DNS records in Route53, set the size to be m1.small
# and use the AMI ami-deadbeef in the ap-southeast-1 region
hosts:
- hostname: foobar-apse1.action.io
size: m1.small
ami: ami-deadbeef
- region: us-west-1
environments:
staging:
host_vars:
rainbow:
- name: cors_allowed_origin
value: https://staging.action.io
- name: socketio_allowed_origin
value: https://staging.action.io:*
# This will create an EC2 instance with the name tagged as foobar-usw1-staging.action.io
# Will create the appropriate DNS records in Route53, set the size to be m1.small
# and use the AMI ami-deadbeef in the us-west-1 region
hosts:
- hostname: foobar-usw1-staging.action.io
size: m1.small
ami: ami-deadbeef
production:
host_vars:
rainbow:
- name: cors_allowed_origin
value: https://www.action.io
- name: socketio_allowed_origin
value: https://www.action.io:*
# This will create an EC2 instance with the name tagged as foobar-usw1.action.io
# Will create the appropriate DNS records in Route53, set the size to be m1.small
# and use the AMI ami-deadbeef in the us-west-1 region
hosts:
- hostname: foobar-usw1.action.io
size: m1.small
ami: ami-deadbeef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment