- name: Create persistent volumes and create hosted services hosts: oo_first_master vars: attach_registry_volume: "{{ openshift.hosted.registry.storage.kind != None }}" deploy_infra: "{{ openshift.master.infra_nodes | default([]) | length > 0 }}" 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_serviceaccounts openshift_serviceaccounts_names: - router - registry openshift_serviceaccounts_namespace: default openshift_serviceaccounts_sccs: - privileged - role: openshift_registry registry_volume_claim: "{{ openshift.hosted.registry.storage.volume.name }}-claim" when: deploy_infra | bool and attach_registry_volume | bool - role: openshift_metrics when: openshift.hosted.metrics.deploy | bool - name: Create Hosted Resources hosts: oo_first_master pre_tasks: - set_fact: openshift_hosted_router_registryurl: "{{ hostvars[groups.oo_first_master.0].openshift.master.registry_url }}" roles: - role: openshift_hosted