Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zippyz
Created October 23, 2012 20:41
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 zippyz/3941410 to your computer and use it in GitHub Desktop.
Save zippyz/3941410 to your computer and use it in GitHub Desktop.
for configDict in yaml.load_all(stream):
if configDict['instance']['id'] == instance:
#assign local variables
TEST_CONFIG_FILE.write("id: " + configDict['instance']['saltId'] + "\n")
yaml.dump(configDict['instance']['grains'], TEST_CONFIG_FILE)
TEST_CONFIG_FILE.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment