From 1d3d73a0b643a630a751ad0acc59b0f6a430b95b Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Wed, 19 Mar 2014 09:01:13 -0500 Subject: [PATCH] Only write the DUMMY_CA_CERT on OS X --- lib/ansible/module_utils/urls.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index 2eb26bfd6a2..e02f171aee4 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -137,8 +137,9 @@ class SSLValidationHandler(urllib2.BaseHandler): tmp_fd, tmp_path = tempfile.mkstemp() - # Write the dummy ca cert - os.write(tmp_fd, DUMMY_CA_CERT) + # Write the dummy ca cert if we are running on Mac OS X + if platform == 'Darwin': + os.write(tmp_fd, DUMMY_CA_CERT) # for all of the paths, find any .crt or .pem files # and compile them into single temp file for use