Commit bcf54a51 authored by Jürgen Haas's avatar Jürgen Haas

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

parent 939dcd27
......@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment