Ansible Tower user and credential module (#21020)

* rename tower config module parameters to avoid conflicts

* add Ansible Tower user module

* add Ansible Tower credential module

* remove errant hash from interpreter line

* friendlier error messages

* Update tower_verify_ssl defaults and module examples

* Update tower_verify_ssl default documentation

* Tower expects satellite6 not foreman
This commit is contained in:
Wayne Witzel III 2017-02-15 11:59:03 -05:00 committed by John R Barker
commit f98d41c121
4 changed files with 516 additions and 22 deletions

View file

@ -52,16 +52,16 @@ def tower_auth_config(module):
return parser.string_to_dict(f.read())
else:
auth_config = {}
host = module.params.get('host')
host = module.params.get('tower_host')
if host:
auth_config['host'] = host
username = module.params.get('username')
username = module.params.get('tower_username')
if username:
auth_config['username'] = username
password = module.params.get('password')
password = module.params.get('tower_password')
if password:
auth_config['password'] = password
verify_ssl = module.params.get('verify_ssl')
verify_ssl = module.params.get('tower_verify_ssl')
if verify_ssl:
auth_config['verify_ssl'] = verify_ssl
return auth_config