--- - name: Ensure OpenShift template directory exists file: path="{{ kaas_template_path }}" state="directory" mode=0755 owner=root group=root - name: Configure KaaS volumes include_tasks: volume.yml run_once: true # delegate_to: "{{ groups.masters[0] }}" with_dict: "{{ kaas_project_volumes }}" loop_control: loop_var: osv vars: query: "[*].volumes.{{osv.value.volume}}.mount" mntpath: "{{ (ands_storage_domains | json_query(query)) }}" osvpath: "{{ osv.value.path | default('') }}" prefix: "{{ ( osvpath[:1] == '/' ) | ternary('', '/' ~ kaas_project ~ '/') }}" path: "{{ mntpath[0] ~ prefix ~ osvpath }}" name: "{{osv.key}}" volume: "{{osv.value}}" when: ( mntpath | length ) > 0 - name: Check if static configuration exists local_action: stat path="{{ kaas_project_path }}/files/" register: result - name: Search static configuration include_tasks: search.yml when: result.stat.exists - name: Configure KaaS files include_tasks: file.yml run_once: true # delegate_to: "{{ groups.masters[0] }}" with_items: "{{ kaas_project_config.files | default(kaas_openshift_files) | default([]) }}" loop_control: loop_var: file vars: pvar: "kaas_{{ file.osv }}_path" path: "{{ hostvars[inventory_hostname][pvar] }}/{{ file.path }}" when: file.osv in kaas_project_volumes - name: Load OpenSSL keys include_tasks: keys.yml # delegate_to: "{{ groups.masters[0] }}" run_once: true with_dict: "{{ kaas_project_pods }}" loop_control: loop_var: pod - name: "Run OC script" include_tasks: ocscript.yml # delegate_to: "{{ groups.masters[0] }}" run_once: true when: kaas_project_config.oc is defined - name: "Configure all templates" include_tasks: templates.yml # delegate_to: "{{ groups.masters[0] }}" run_once: true when: - kaas_project_config.oc is undefined