Skip to content

Instantly share code, notes, and snippets.

@proffalken
Created April 23, 2012 10:08
Show Gist options
  • Select an option

  • Save proffalken/2470071 to your computer and use it in GitHub Desktop.

Select an option

Save proffalken/2470071 to your computer and use it in GitHub Desktop.
databag
{
"primary": ["backup0001.domain.com"],
"id": "_global",
}
global_variables = data_bag_item("backupservers", "_global")
if global_variables['primary'].length > 1 then
default[:backups][:primary] = global_variables['primary'][1]
else
default[:backups][:primary] = global_variables['primary'][0]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment