diff options
author | Tim Bielawa <tbielawa@redhat.com> | 2017-07-21 14:33:41 -0400 |
---|---|---|
committer | Tim Bielawa <tbielawa@redhat.com> | 2017-07-21 14:36:54 -0400 |
commit | 58b3a05fbea15efb6ee809e8e3b3b4a0cb977fab (patch) | |
tree | 84a4ee9de94106cc8fc7ba93a68e250fad10a8b5 | |
parent | 0004d0be1bd5fe902379aa1b1fef0903dced4326 (diff) | |
download | openshift-58b3a05fbea15efb6ee809e8e3b3b4a0cb977fab.tar.gz openshift-58b3a05fbea15efb6ee809e8e3b3b4a0cb977fab.tar.bz2 openshift-58b3a05fbea15efb6ee809e8e3b3b4a0cb977fab.tar.xz openshift-58b3a05fbea15efb6ee809e8e3b3b4a0cb977fab.zip |
Default an empty list for etcd_to_config if not there
Also add filter names of filters that failed me for to their error
messages so you can figure out which filter threw an exception when
you're debugging log files.
-rw-r--r-- | filter_plugins/oo_filters.py | 8 | ||||
-rw-r--r-- | playbooks/common/openshift-master/config.yml | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/filter_plugins/oo_filters.py b/filter_plugins/oo_filters.py index c6d0e69eb..36a90a870 100644 --- a/filter_plugins/oo_filters.py +++ b/filter_plugins/oo_filters.py @@ -194,10 +194,10 @@ def oo_select_keys_from_list(data, keys): """ if not isinstance(data, list): - raise errors.AnsibleFilterError("|failed expects to filter on a list") + raise errors.AnsibleFilterError("|oo_select_keys_from_list failed expects to filter on a list") if not isinstance(keys, list): - raise errors.AnsibleFilterError("|failed expects first param is a list") + raise errors.AnsibleFilterError("|oo_select_keys_from_list failed expects first param is a list") # Gather up the values for the list of keys passed in retval = [oo_select_keys(item, keys) for item in data] @@ -213,10 +213,10 @@ def oo_select_keys(data, keys): """ if not isinstance(data, Mapping): - raise errors.AnsibleFilterError("|failed expects to filter on a dict or object") + raise errors.AnsibleFilterError("|oo_select_keys failed expects to filter on a dict or object") if not isinstance(keys, list): - raise errors.AnsibleFilterError("|failed expects first param is a list") + raise errors.AnsibleFilterError("|oo_select_keys failed expects first param is a list") # Gather up the values for the list of keys passed in retval = [data[key] for key in keys if key in data] diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index fe6c1daa2..5de03951c 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -127,7 +127,7 @@ | union(groups['oo_etcd_to_config'] | default([]))) | oo_collect('openshift.common.hostname') | default([]) | join (',') }}" - openshift_no_proxy_etcd_host_ips: "{{ hostvars | oo_select_keys(groups['oo_etcd_to_config']) + openshift_no_proxy_etcd_host_ips: "{{ hostvars | oo_select_keys(groups['oo_etcd_to_config'] | default([])) | oo_collect('openshift.common.ip') | default([]) | join(',') }}" roles: |