summaryrefslogtreecommitdiffstats
path: root/playbooks/init
diff options
context:
space:
mode:
authorMichael Gugino <mgugino@redhat.com>2017-12-21 20:17:10 -0500
committerMichael Gugino <mgugino@redhat.com>2018-01-10 09:40:21 -0500
commit870b4b66cb8cd8a1accd3d1964f2f40a719403ed (patch)
treebbcf6cc49f15c736ba2a9d0602d45021aa148b5a /playbooks/init
parentee2d4b8e66a344e8f6ca12cbc9362a80a07555d0 (diff)
downloadopenshift-870b4b66cb8cd8a1accd3d1964f2f40a719403ed.tar.gz
openshift-870b4b66cb8cd8a1accd3d1964f2f40a719403ed.tar.bz2
openshift-870b4b66cb8cd8a1accd3d1964f2f40a719403ed.tar.xz
openshift-870b4b66cb8cd8a1accd3d1964f2f40a719403ed.zip
Add defaults for openshift_pkg_version
This variable may or may not be defined by the users. During deployments, it will be set to '-{{ openshift_version }}' if undefined. During upgrades, it will remain undefined. This commit ensures that if the variable is undefined, empty strings '' are set.
Diffstat (limited to 'playbooks/init')
-rw-r--r--playbooks/init/version.yml4
1 files changed, 2 insertions, 2 deletions
diff --git a/playbooks/init/version.yml b/playbooks/init/version.yml
index 8d1d61fde..962ee7220 100644
--- a/playbooks/init/version.yml
+++ b/playbooks/init/version.yml
@@ -6,7 +6,7 @@
- include_role:
name: openshift_version
tasks_from: first_master.yml
- - debug: msg="openshift_pkg_version set to {{ openshift_pkg_version }}"
+ - debug: msg="openshift_pkg_version set to {{ openshift_pkg_version | default('') }}"
# NOTE: We set this even on etcd hosts as they may also later run as masters,
# and we don't want to install wrong version of docker and have to downgrade
@@ -16,7 +16,7 @@
vars:
l_default_version_set_hosts: "oo_etcd_to_config:oo_nodes_to_config:oo_masters_to_config:!oo_first_master"
l_first_master_openshift_version: "{{ hostvars[groups.oo_first_master.0].openshift_version }}"
- l_first_master_openshift_pkg_version: "{{ hostvars[groups.oo_first_master.0].openshift_pkg_version }}"
+ l_first_master_openshift_pkg_version: "{{ hostvars[groups.oo_first_master.0].openshift_pkg_version | default('') }}"
l_first_master_openshift_image_tag: "{{ hostvars[groups.oo_first_master.0].openshift_image_tag}}"
tasks:
- set_fact: