Ship constants to the modules via internal module params rather than a secondary dict.

This commit is contained in:
Toshio Kuratomi 2016-05-12 20:30:05 -07:00
parent a404d0ffe2
commit 186337db28
11 changed files with 42 additions and 39 deletions

View file

@ -263,7 +263,7 @@ def rax_required_together():
def setup_rax_module(module, rax_module, region_required=True):
"""Set up pyrax in a standard way for all modules"""
rax_module.USER_AGENT = 'ansible/%s %s' % (module.constants['ANSIBLE_VERSION'],
rax_module.USER_AGENT = 'ansible/%s %s' % (module.ansible_version,
rax_module.USER_AGENT)
api_key = module.params.get('api_key')