Skip to content

Instantly share code, notes, and snippets.

@richleland
Created February 21, 2012 19:35
Show Gist options
  • Select an option

  • Save richleland/1878379 to your computer and use it in GitHub Desktop.

Select an option

Save richleland/1878379 to your computer and use it in GitHub Desktop.
def add_hosts(destination, host_list):
for key, val in env.roledefs.items():
if key == destination and host_list not in env.roledefs[key]:
env.roledefs[key] = list(set(env.roledefs[key] + host_list))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment