Hi there,
i've extended our ansible inventory for ansible 1.9.1 with a custom
vars-plugin. This plugin uses the method load_vars from the utils
module/class imported by "from ansible import utils" (sorry for this simple
description, i'm not that proficient in python).
The code using load_vars looks like this:
class VarsModule(object):
// ...
def _collect_results(self, base_path, group_name, vault_password,
results):
path = os.path.join(base_path, group_name)
if not os.path.exists(path):
return results
results = utils.load_vars(path, results, vault_password=
vault_password)
return results
//...
It get's a base-path, a group-name and an dictionary containing other
variables an combines them with the variables from the files below the
folder "base_path/group_name".
The method utils.load_vars is missing from the new 2.x APIs (yeah i know,
never work against internal apis...). Is there a way to achieve its
behaviour using the new API?
Kind regards
Karsten
--
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/c0ae0dfb-8d62-4a9c-963d-0fe2101be593%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.