projects
/
mirror
/
dsa-puppet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Only add host to bacula dsa client list if we do backups for it
[mirror/dsa-puppet.git]
/
modules
/
roles
/
files
/
mirror_health
/
mirror-health
diff --git
a/modules/roles/files/mirror_health/mirror-health
b/modules/roles/files/mirror_health/mirror-health
index
2c582f2
..
bbd4c27
100755
(executable)
--- a/
modules/roles/files/mirror_health/mirror-health
+++ b/
modules/roles/files/mirror_health/mirror-health
@@
-21,7
+21,8
@@
def retrieve_from_host(host, url):
'http': 'http://{}:80'.format(host),
'https': 'http://{}:443'.format(host),
}
'http': 'http://{}:80'.format(host),
'https': 'http://{}:443'.format(host),
}
- return requests.get(url, timeout=5, proxies=proxies, allow_redirects=False)
+ headers = {'User-Agent': 'mirror-health'}
+ return requests.get(url, headers=headers, timeout=5, proxies=proxies, allow_redirects=False)
def last_modified(response):
lm = 0
def last_modified(response):
lm = 0