Skip to content

Commit b6b2d9f

Browse files
committed
automatically use system certs via truststore
1 parent 4c611fa commit b6b2d9f

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

plugins/inventory/foreman.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,12 @@
196196
from ansible.plugins.inventory import BaseInventoryPlugin, Cacheable, to_safe_group_name, Constructable
197197

198198
# 3rd party imports
199+
try:
200+
import truststore
201+
truststore.inject_into_ssl()
202+
except ImportError:
203+
pass
204+
199205
try:
200206
import requests
201207
if LooseVersion(requests.__version__) < LooseVersion('1.1.0'):

plugins/module_utils/_apypie.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,11 @@ def _prepare_route_params(self, input_dict):
235235
Apypie Api module
236236
"""
237237

238+
try:
239+
import truststore
240+
truststore.inject_into_ssl()
241+
except ImportError:
242+
pass
238243

239244
import errno
240245
import glob

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
requests>=2.4.2
22
PyYAML
3+
truststore

0 commit comments

Comments
 (0)