Browse Source

Merge pull request #2250 from abutcher/hosted-nodes

Rename router and registry node list variables.
Scott Dodson 8 years ago
parent
commit
4d70c314f0

+ 2 - 2
roles/openshift_hosted/tasks/registry/registry.yml

@@ -4,12 +4,12 @@
     {{ openshift.common.client_binary }} --api-version='v1' -o json
     get nodes -n default --config={{ openshift_hosted_kubeconfig }}
     --selector={{ openshift.hosted.registry.selector | default('') }}
-  register: openshift_hosted_registry_nodes_json
+  register: registry_nodes_json
   changed_when: false
   when: openshift.hosted.registry.replicas | default(none) is none
 
 - set_fact:
-    l_node_count: "{{ (openshift_hosted_registry_nodes_json.stdout | default('{\"items\":[]}') | from_json)['items'] | length }}"
+    l_node_count: "{{ (registry_nodes_json.stdout | default('{\"items\":[]}') | from_json)['items'] | length }}"
 
 # Determine the default number of registry/router replicas to use if no count
 # has been specified.

+ 2 - 2
roles/openshift_hosted/tasks/router/router.yml

@@ -39,12 +39,12 @@
     {{ openshift.common.client_binary }} --api-version='v1' -o json
     get nodes -n default --config={{ openshift_hosted_kubeconfig }}
     --selector={{ openshift.hosted.router.selector | default('') }}
-  register: openshift_hosted_router_nodes_json
+  register: router_nodes_json
   changed_when: false
   when: openshift.hosted.router.replicas | default(none) is none
 
 - set_fact:
-    replicas: "{{ openshift.hosted.router.replicas | default((openshift_hosted_router_nodes_json.stdout | default('{\"items\":[]}') | from_json)['items'] | length) }}"
+    replicas: "{{ openshift.hosted.router.replicas | default((router_nodes_json.stdout | default('{\"items\":[]}') | from_json)['items'] | length) }}"
 
 - name: Create OpenShift router
   command: >