Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.8 KiB

diff -Naur ansible-2.3.1.0.orig/lib/ansible/modules/web_infrastructure/htpasswd.py ansible-2.3.1.0/lib/ansible/modules/web_infrastructure/htpasswd.py
--- ansible-2.3.1.0.orig/lib/ansible/modules/web_infrastructure/htpasswd.py 2017-06-01 19:00:05.000000000 +0200
+++ ansible-2.3.1.0/lib/ansible/modules/web_infrastructure/htpasswd.py 2017-06-18 19:43:28.946363735 +0200
@@ -104,7 +104,7 @@
import os
import tempfile
-from distutils.version import StrictVersion
+from distutils.version import LooseVersion
try:
from passlib.apache import HtpasswdFile, htpasswd_context
@@ -138,7 +138,7 @@
if check_mode:
return ("Create %s" % dest, True)
create_missing_directories(dest)
- if StrictVersion(passlib.__version__) >= StrictVersion('1.6'):
+ if LooseVersion(passlib.__version__) >= LooseVersion('1.6'):
ht = HtpasswdFile(dest, new=True, default_scheme=crypt_scheme, context=context)
else:
ht = HtpasswdFile(dest, autoload=False, default=crypt_scheme, context=context)
@@ -149,7 +149,7 @@
ht.save()
return ("Created %s and added %s" % (dest, username), True)
else:
- if StrictVersion(passlib.__version__) >= StrictVersion('1.6'):
+ if LooseVersion(passlib.__version__) >= LooseVersion('1.6'):
ht = HtpasswdFile(dest, new=False, default_scheme=crypt_scheme, context=context)
else:
ht = HtpasswdFile(dest, default=crypt_scheme, context=context)
@@ -176,7 +176,7 @@
""" Ensures user is absent
Returns (msg, changed) """
- if StrictVersion(passlib.__version__) >= StrictVersion('1.6'):
+ if LooseVersion(passlib.__version__) >= LooseVersion('1.6'):
ht = HtpasswdFile(dest, new=False)
else:
ht = HtpasswdFile(dest)