summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorAndrew Butcher <abutcher@redhat.com>2016-01-19 14:50:55 -0500
committerAndrew Butcher <abutcher@redhat.com>2016-02-01 17:05:55 -0500
commit44e5ddc20e7069e5345f48426a69e725aa8ea1d4 (patch)
tree638eb0ffb58c3482e2fd44766e867d6e68fac0f4 /playbooks/common
parent3d3053062ee3bca175df6eb4dd66ff56237234ca (diff)
downloadopenshift-44e5ddc20e7069e5345f48426a69e725aa8ea1d4.tar.gz
openshift-44e5ddc20e7069e5345f48426a69e725aa8ea1d4.tar.bz2
openshift-44e5ddc20e7069e5345f48426a69e725aa8ea1d4.tar.xz
openshift-44e5ddc20e7069e5345f48426a69e725aa8ea1d4.zip
Refactor registry storage options.
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-master/config.yml21
-rw-r--r--playbooks/common/openshift-nfs/config.yml1
2 files changed, 12 insertions, 10 deletions
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