Skip to content

Instantly share code, notes, and snippets.

@robbyt
Created August 11, 2011 20:01
Show Gist options
  • Save robbyt/1140598 to your computer and use it in GitHub Desktop.
Save robbyt/1140598 to your computer and use it in GitHub Desktop.
case $cloud {
'rackspace': {
Host <<| tag == 'normal_server_private-rackspace' |>>
Host <<| tag == 'normal_server_public-us-east-1' |>>
Host <<| tag == 'normal_server_public-us-west-1' |>>
}
'ec2',default: {
case $server_type {
'puppet': {
case $ec2_region {
'us-west-1': {
Host <<| tag == 'puppetmaster_private-us-west-1' |>>
Host <<| tag == 'normal_server_private-us-west-1' |>>
Host <<| tag == 'normal_server_public-us-east-1' |>>
Host <<| tag == 'normal_server_public-rackspace' |>>
}
'us-east-1',default: {
Host <<| tag == 'puppetmaster_private-us-east-1' |>>
Host <<| tag == 'normal_server_private-us-east-1' |>>
Host <<| tag == 'normal_server_public-us-west-1' |>>
Host <<| tag == 'normal_server_public-rackspace' |>>
}
}
}
default: {
case $ec2_region {
'us-west-1': {
Host <<| tag == 'normal_server_private-us-west-1' |>>
Host <<| tag == 'normal_server_public-us-east-1' |>>
Host <<| tag == 'normal_server_public-rackspace' |>>
}
'us-east-1',default: {
Host <<| tag == 'normal_server_private-us-east-1' |>>
Host <<| tag == 'normal_server_public-us-west-1' |>>
Host <<| tag == 'normal_server_public-rackspace' |>>
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment