From b56907db97edcb85aaf9816c3e603d311fd8f316 Mon Sep 17 00:00:00 2001 From: Andrew Butcher Date: Thu, 5 Nov 2015 07:25:53 -0500 Subject: Don't check for certs in data_dir just raise when they can't be found. Fix typo. --- filter_plugins/oo_filters.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'filter_plugins') diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index f494c0ae5..44872ba28 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -378,13 +378,8 @@ class FilterModule(object): certificate['names'] = [] if not os.path.isfile(certificate['certfile']) and not os.path.isfile(certificate['keyfile']): - # Unable to find cert/key, try to prepend data_dir to paths - certificate['certfile'] = os.path.join(data_dir, certificate['certfile']) - certificate['keyfile'] = os.path.join(data_dir, certificate['keyfile']) - if not os.path.isfile(certificate['certfile']) and not os.path.isfile(certificate['keyfile']): - # Unable to find cert/key in data_dir - raise errors.AnsibleFilterError("|certificate and/or key does not exist '%s', '%s'" % - (certificate['certfile'], certificate['keyfile'])) + raise errors.AnsibleFilterError("|certificate and/or key does not exist '%s', '%s'" % + (certificate['certfile'], certificate['keyfile'])) try: st_cert = open(certificate['certfile'], 'rt').read() -- cgit v1.2.1