summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorRodolfo Carvalho <rhcarvalho@gmail.com>2017-06-12 11:49:02 +0200
committerRodolfo Carvalho <rhcarvalho@gmail.com>2017-06-12 11:49:02 +0200
commit29995105c0143505a51b3c1102a3eadc60b46318 (patch)
treea43e7e376b6ec7ff08ef8614f757cb8a0941a188 /playbooks
parentdc12c4b28321e944b2fd3a35241510fd6513fcae (diff)
downloadopenshift-29995105c0143505a51b3c1102a3eadc60b46318.tar.gz
openshift-29995105c0143505a51b3c1102a3eadc60b46318.tar.bz2
openshift-29995105c0143505a51b3c1102a3eadc60b46318.tar.xz
openshift-29995105c0143505a51b3c1102a3eadc60b46318.zip
Fix possible access to undefined variable
g_glusterfs_hosts is verified to be defined in the beginning of the playbook. g_glusterfs_registry_hosts is only defined when playbooks/byo/openshift-cluster/cluster_hosts.yml is loaded, which seems to not always be the case. Instead of trying to find all entrypoints where cluster_hosts should be loaded to defined the variable, simply use the `default()` filter to consider it empty when not defined.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/common/openshift-cluster/evaluate_groups.yml2
1 files changed, 1 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/evaluate_groups.yml b/playbooks/common/openshift-cluster/evaluate_groups.yml
index 46932b27f..c28ce4c14 100644
--- a/playbooks/common/openshift-cluster/evaluate_groups.yml
+++ b/playbooks/common/openshift-cluster/evaluate_groups.yml
@@ -155,5 +155,5 @@
groups: oo_glusterfs_to_config
ansible_ssh_user: "{{ g_ssh_user | default(omit) }}"
ansible_become: "{{ g_sudo | default(omit) }}"
- with_items: "{{ g_glusterfs_hosts | union(g_glusterfs_registry_hosts) | default([]) }}"
+ with_items: "{{ g_glusterfs_hosts | union(g_glusterfs_registry_hosts | default([])) }}"
changed_when: no