summaryrefslogtreecommitdiffstats
path: root/roles/openshift_node
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2016-03-07 13:35:46 -0500
committerBrenton Leanhardt <bleanhar@redhat.com>2016-03-07 15:10:33 -0500
commit4b394fc566333d4d9f4bc789b03b9a68c22bb028 (patch)
tree860179d0fa85a68e624c8d131b50b5b8cd31fae3 /roles/openshift_node
parentb0ebc4302507ca9464837281ea9cf4aeb5ef4e90 (diff)
downloadopenshift-4b394fc566333d4d9f4bc789b03b9a68c22bb028.tar.gz
openshift-4b394fc566333d4d9f4bc789b03b9a68c22bb028.tar.bz2
openshift-4b394fc566333d4d9f4bc789b03b9a68c22bb028.tar.xz
openshift-4b394fc566333d4d9f4bc789b03b9a68c22bb028.zip
Support openshift_image_tag
This is the containerized openshift_pkg_version equivalent. Originally I was hoping to reuse openshift_pkg_version for containerized installs but the fact that it's very coupled to yum made that pretty ugly. However, I did opt to rely on the previously existing 'openshift_version' variable. Containerized and RPM installs can both use that variable and it will be set appropriately if either openshift_pkg_version or openshift_image_tag are set. I suspect someday containerized installs will be the only option and I didn't can to have thinkgs like openshift_pkg_version and openshift_image_tag in the playbooks anymore the necessary.
Diffstat (limited to 'roles/openshift_node')
-rw-r--r--roles/openshift_node/tasks/main.yml2
-rw-r--r--roles/openshift_node/templates/openvswitch.sysconfig.j22
-rw-r--r--roles/openshift_node/vars/main.yml2
3 files changed, 3 insertions, 3 deletions
diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml
index 71ed9ba08..b87c2aa21 100644
--- a/roles/openshift_node/tasks/main.yml
+++ b/roles/openshift_node/tasks/main.yml
@@ -110,7 +110,7 @@
- regex: '^CONFIG_FILE='
line: "CONFIG_FILE={{ openshift_node_config_file }}"
- regex: '^IMAGE_VERSION='
- line: "IMAGE_VERSION=v{{ openshift.common.version.split('-')[0] }}"
+ line: "IMAGE_VERSION={{ openshift_version }}"
notify:
- restart node
diff --git a/roles/openshift_node/templates/openvswitch.sysconfig.j2 b/roles/openshift_node/templates/openvswitch.sysconfig.j2
index 190ffd51b..1f8c20e07 100644
--- a/roles/openshift_node/templates/openvswitch.sysconfig.j2
+++ b/roles/openshift_node/templates/openvswitch.sysconfig.j2
@@ -1 +1 @@
-IMAGE_VERSION={{ openshift.common.image_tag }}
+IMAGE_VERSION={{ openshift_version }}
diff --git a/roles/openshift_node/vars/main.yml b/roles/openshift_node/vars/main.yml
index 43dc50ca8..28582baf1 100644
--- a/roles/openshift_node/vars/main.yml
+++ b/roles/openshift_node/vars/main.yml
@@ -1,4 +1,4 @@
---
openshift_node_config_dir: "{{ openshift.common.config_base }}/node"
openshift_node_config_file: "{{ openshift_node_config_dir }}/node-config.yaml"
-openshift_version: "{{ openshift_pkg_version | default('') }}"
+openshift_version: "{{ openshift_pkg_version | default(openshift_image_tag) | default(openshift.common.image_tag) | default('') }}"