summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/tasks/search.yml
blob: 9844ee8f6af05a330279b591fb9580dad3ee93ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
- name: Copy static configuration
  include_tasks: sync_all.yml
  run_once: true
#  delegate_to: "{{ groups.masters[0] }}"
  with_items: "{{ lookup('pipe', search).split('\n') }}"
  loop_control:
    loop_var: osv_path
  vars:
    search: "find {{ kaas_project_path }}/files/ -type d -mindepth 1 -maxdepth 1"
    osv: "{{ osv_path | basename }}"    
    pvar: "kaas_{{ osv }}_path"
    local_path: "{{ osv_path }}"
    remote_path: "{{ hostvars[inventory_hostname][pvar] }}"
  when:
    - osv in (kaas_project_config.volumes | default(kaas_openshift_volumes))
    - hostvars[inventory_hostname][pvar] is defined