Skip to content
Snippets Groups Projects
Commit bcf54a51 authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-inventories/arocom#2861 Add support for basic auth on certain locations only

parent 939dcd27
No related branches found
No related tags found
No related merge requests found
......@@ -214,7 +214,7 @@ class ActionModule(ActionBase):
def _buildUrl(self, item, field, path):
authPrefix = ''
auth = item.get('apache_auth')
if auth and auth.get('type') == 'Basic':
if auth and auth.get('user') and auth.get('type') == 'Basic':
authPrefix = auth.get('user') + ':' + auth.get('password') + '@'
url = item.get('protocol', 'https') + '://' + authPrefix + item.get(field)
uptime = item.get('uptime')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment