diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2015-11-06 16:17:08 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2015-11-06 16:17:08 -0500 |
commit | 981c3c8621e36f0c90506923293bb3c8d6444376 (patch) | |
tree | 24bc78ebab4fdb5aafa3f44ce1e3a1545007d7db | |
parent | 925db7a8663c38144e2dc145ccff1b05315924c3 (diff) | |
parent | 753c0e31a9e8adb84f6352aaef47d410abee307c (diff) | |
download | openshift-981c3c8621e36f0c90506923293bb3c8d6444376.tar.gz openshift-981c3c8621e36f0c90506923293bb3c8d6444376.tar.bz2 openshift-981c3c8621e36f0c90506923293bb3c8d6444376.tar.xz openshift-981c3c8621e36f0c90506923293bb3c8d6444376.zip |
Merge pull request #818 from abutcher/custom-certs-fixes
Named certificate fixes
-rw-r--r-- | filter_plugins/oo_filters.py | 11 | ||||
-rwxr-xr-x | roles/openshift_facts/library/openshift_facts.py | 2 |
2 files changed, 4 insertions, 9 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index f494c0ae5..f4643270d 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -377,14 +377,9 @@ class FilterModule(object): else: 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'])) + if not os.path.isfile(certificate['certfile']) or not os.path.isfile(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() diff --git a/roles/openshift_facts/library/openshift_facts.py b/roles/openshift_facts/library/openshift_facts.py index 1ba5fc13b..33aca987d 100755 --- a/roles/openshift_facts/library/openshift_facts.py +++ b/roles/openshift_facts/library/openshift_facts.py @@ -517,7 +517,7 @@ def set_aggregate_facts(facts): facts['master']['etcd_data_dir'] = '/var/lib/etcd' facts['common']['all_hostnames'] = list(all_hostnames) - facts['common']['internal_hostnames'] = list(all_hostnames) + facts['common']['internal_hostnames'] = list(internal_hostnames) return facts |