summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorJason DeTiberus <jdetiber@redhat.com>2016-02-02 16:47:39 -0500
committerJason DeTiberus <jdetiber@redhat.com>2016-02-09 15:49:55 -0500
commit34455e0f4f2d4b6ea0b21703f711448e947bf0c7 (patch)
treefa555468f132b6f8cb8eb0e9c17aee1d69124dde /playbooks/common
parentf100d0f0762d66e4a613c4641861ea8641d92b92 (diff)
downloadopenshift-34455e0f4f2d4b6ea0b21703f711448e947bf0c7.tar.gz
openshift-34455e0f4f2d4b6ea0b21703f711448e947bf0c7.tar.bz2
openshift-34455e0f4f2d4b6ea0b21703f711448e947bf0c7.tar.xz
openshift-34455e0f4f2d4b6ea0b21703f711448e947bf0c7.zip
Fix infra_node deployment
- Do not deploy the router/registry when the infra_nodes variable is present but does not contain a list of infra nodes. - use right node group and only set openshift_infra_nodes if group is present
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-master/config.yml16
1 files changed, 11 insertions, 5 deletions
diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml
index 3d646be64..648a63150 100644
--- a/playbooks/common/openshift-master/config.yml
+++ b/playbooks/common/openshift-master/config.yml
@@ -170,10 +170,10 @@
master_cert_subdir: master-{{ openshift.common.hostname }}
master_cert_config_dir: "{{ openshift.common.config_base }}/master"
- set_fact:
- openshift_infra_nodes: "{{ hostvars | oo_select_keys(groups['nodes'])
+ openshift_infra_nodes: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'])
| oo_nodes_with_label('region', 'infra')
| oo_collect('inventory_hostname') }}"
- when: openshift_infra_nodes is not defined
+ when: openshift_infra_nodes is not defined and groups.oo_nodes_to_config | default([]) | length > 0
- name: Configure master certificates
hosts: oo_first_master
@@ -408,7 +408,6 @@
- name: Configure service accounts
hosts: oo_first_master
vars:
- accounts: ["router", "registry"]
roles:
- openshift_serviceaccounts
@@ -417,10 +416,17 @@
vars:
persistent_volumes: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volumes(groups) }}"
persistent_volume_claims: "{{ hostvars[groups.oo_first_master.0] | oo_persistent_volume_claims }}"
+ attach_registry_volume: "{{ openshift.hosted.registry.storage.kind != None }}"
+ deploy_infra: "{{ openshift.master.infra_nodes | default(0) | length > 0 }}"
+ pre_tasks:
+ - set_fact:
+ nfs_host: "{{ groups.oo_nfs_to_config.0 }}"
+ registry_volume_path: "{{ hostvars[groups.oo_nfs_to_config.0].openshift.nfs.exports_dir + '/' + hostvars[groups.oo_nfs_to_config.0].openshift.nfs.registry_volume }}"
+ when: attach_registry_volume | bool
roles:
- role: openshift_persistent_volumes
when: persistent_volumes | length > 0 or persistent_volume_claims | length > 0
- role: openshift_router
- when: openshift.master.infra_nodes is defined
+ when: deploy_infra | bool
- role: openshift_registry
- when: openshift.master.infra_nodes is defined and openshift.hosted.registry.storage.kind != None
+ when: deploy_infra | bool and attach_registry_volume | bool