Nice concept.
If you prefer not to mix python and bash, you could create a common_vars.py
instead. Something like:
#! /usr/bin/env python
import os, sys, yaml, json
srcfile = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), '..',
'common_vars.yml'))
with open(srcfile) as f:
json.dump({"all": {"vars": yaml.load(f) } }, sys.stdout, indent=4)
Remember to make it executable with chmod +x as with the bash script.
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/3967777f-1fc8-4dbd-9b89-2a2e5fd746b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.