diff options
author | Brenton Leanhardt <bleanhar@redhat.com> | 2016-02-03 13:09:59 -0500 |
---|---|---|
committer | Brenton Leanhardt <bleanhar@redhat.com> | 2016-02-03 13:09:59 -0500 |
commit | b40b5a26bb1a731dce16f3d0ba381a52ecd5dc8a (patch) | |
tree | 0bd81b49530746ed57609bc5770458ecdec08d7c /playbooks | |
parent | fda67ef2addee2cb4cb982c8b9e0eb13bcf9ff7e (diff) | |
parent | 5ff53c80f23744bb5f40d60e2b7da504440f450f (diff) | |
download | openshift-b40b5a26bb1a731dce16f3d0ba381a52ecd5dc8a.tar.gz openshift-b40b5a26bb1a731dce16f3d0ba381a52ecd5dc8a.tar.bz2 openshift-b40b5a26bb1a731dce16f3d0ba381a52ecd5dc8a.tar.xz openshift-b40b5a26bb1a731dce16f3d0ba381a52ecd5dc8a.zip |
Merge pull request #1173 from abutcher/nfs-group
Refactor storage options
Diffstat (limited to 'playbooks')
-rw-r--r-- | playbooks/aws/openshift-cluster/config.yml | 1 | ||||
-rw-r--r-- | playbooks/byo/openshift_facts.yml | 1 | ||||
-rw-r--r-- | playbooks/common/openshift-master/config.yml | 21 | ||||
-rw-r--r-- | playbooks/common/openshift-nfs/config.yml | 1 | ||||
-rw-r--r-- | playbooks/gce/openshift-cluster/config.yml | 1 | ||||
-rw-r--r-- | playbooks/libvirt/openshift-cluster/config.yml | 1 | ||||
-rw-r--r-- | playbooks/openstack/openshift-cluster/config.yml | 1 |
7 files changed, 17 insertions, 10 deletions
diff --git a/playbooks/aws/openshift-cluster/config.yml b/playbooks/aws/openshift-cluster/config.yml index 33fcf6af5..9f077bfc2 100644 --- a/playbooks/aws/openshift-cluster/config.yml +++ b/playbooks/aws/openshift-cluster/config.yml @@ -10,6 +10,7 @@ openshift_debug_level: "{{ debug_level }}" openshift_deployment_type: "{{ deployment_type }}" openshift_public_hostname: "{{ ec2_ip_address }}" + openshift_registry_selector: 'type=infra' openshift_router_selector: 'type=infra' openshift_infra_nodes: "{{ g_infra_hosts }}" openshift_node_labels: '{"region": "{{ ec2_region }}", "type": "{{ hostvars[inventory_hostname]["ec2_tag_sub-host-type"] if inventory_hostname in groups["tag_host-type_node"] else hostvars[inventory_hostname]["ec2_tag_host-type"] }}"}' diff --git a/playbooks/byo/openshift_facts.yml b/playbooks/byo/openshift_facts.yml index babdfb952..916dfd0a6 100644 --- a/playbooks/byo/openshift_facts.yml +++ b/playbooks/byo/openshift_facts.yml @@ -5,5 +5,6 @@ - openshift_facts tasks: - openshift_facts: + openshift_env: "{{ hostvars[inventory_hostname] | oo_openshift_env }}" register: result - debug: var=result diff --git a/playbooks/common/openshift-master/config.yml b/playbooks/common/openshift-master/config.yml index 6f86703d6..3d646be64 100644 --- a/playbooks/common/openshift-master/config.yml +++ b/playbooks/common/openshift-master/config.yml @@ -53,6 +53,11 @@ console_use_ssl: "{{ openshift_master_console_use_ssl | default(None) }}" public_console_url: "{{ openshift_master_public_console_url | default(None) }}" portal_net: "{{ openshift_master_portal_net | default(None) }}" + - openshift_facts: + role: hosted + openshift_env: + openshift_hosted_registry_storage_kind: 'nfs' + when: openshift_hosted_registry_storage_kind is not defined and groups.oo_nfs_to_config is defined and groups.oo_nfs_to_config | length > 0 - name: Check status of external etcd certificatees stat: path: "{{ openshift.common.config_base }}/master/{{ item }}" @@ -402,24 +407,20 @@ - name: Configure service accounts hosts: oo_first_master - vars: accounts: ["router", "registry"] - roles: - openshift_serviceaccounts -- name: Create services +- name: Create persistent volumes and services hosts: oo_first_master vars: - attach_registry_volume: "{{ groups.oo_nfs_to_config | 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 + 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 }}" 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 - role: openshift_registry - when: openshift.master.infra_nodes is defined and attach_registry_volume | bool + when: openshift.master.infra_nodes is defined and openshift.hosted.registry.storage.kind != None diff --git a/playbooks/common/openshift-nfs/config.yml b/playbooks/common/openshift-nfs/config.yml index e3f5c17ca..ba7530ed7 100644 --- a/playbooks/common/openshift-nfs/config.yml +++ b/playbooks/common/openshift-nfs/config.yml @@ -2,4 +2,5 @@ - name: Configure nfs hosts hosts: oo_nfs_to_config roles: + - role: openshift_facts - role: openshift_storage_nfs diff --git a/playbooks/gce/openshift-cluster/config.yml b/playbooks/gce/openshift-cluster/config.yml index d1aa31bc8..834164bab 100644 --- a/playbooks/gce/openshift-cluster/config.yml +++ b/playbooks/gce/openshift-cluster/config.yml @@ -11,6 +11,7 @@ openshift_debug_level: "{{ debug_level }}" openshift_deployment_type: "{{ deployment_type }}" openshift_hostname: "{{ gce_private_ip }}" + openshift_registry_selector: 'type=infra' openshift_router_selector: 'type=infra' openshift_infra_nodes: "{{ g_infra_hosts }}" openshift_master_cluster_method: 'native' diff --git a/playbooks/libvirt/openshift-cluster/config.yml b/playbooks/libvirt/openshift-cluster/config.yml index 9bd99c4fc..6b327f7d0 100644 --- a/playbooks/libvirt/openshift-cluster/config.yml +++ b/playbooks/libvirt/openshift-cluster/config.yml @@ -13,6 +13,7 @@ openshift_cluster_id: "{{ cluster_id }}" openshift_debug_level: "{{ debug_level }}" openshift_deployment_type: "{{ deployment_type }}" + openshift_registry_selector: 'type=infra' openshift_router_selector: 'type=infra' openshift_infra_nodes: "{{ g_infra_hosts }}" openshift_master_cluster_method: 'native' diff --git a/playbooks/openstack/openshift-cluster/config.yml b/playbooks/openstack/openshift-cluster/config.yml index 5128e767f..e09a72ae1 100644 --- a/playbooks/openstack/openshift-cluster/config.yml +++ b/playbooks/openstack/openshift-cluster/config.yml @@ -11,6 +11,7 @@ openshift_debug_level: "{{ debug_level }}" openshift_deployment_type: "{{ deployment_type }}" openshift_hostname: "{{ ansible_default_ipv4.address }}" + openshift_registry_selector: 'type=infra' openshift_router_selector: 'type=infra' openshift_infra_nodes: "{{ g_infra_hosts }}" openshift_master_cluster_method: 'native' |