---

#long running tasks - run them in background - we do not actually care about the results
- name: reposync for fedora
  shell: nohup retrace-server-reposync fedora {{ item[0] }} {{ item[1] }} </dev/null >$(mktemp /tmp/ansible.reposync_for_fedoraXXXXXX.log) &
  with_nested:
    - "{{ rs_internal_fedora_vers }}"
    - "{{ rs_internal_arch_list }}"
  become: yes
  become_user: retrace
  tags: [rs_reposync, rs_fedora]
  when: not devel

- name: reposync for centos
  shell: nohup retrace-server-reposync centos 7 x86_64 </dev/null >$(mktemp /tmp/ansible.reposync_for_centosXXXXXX.log) &
  become: yes
  become_user: retrace
  tags: [rs_reposync, rs_fedora]
  when: not devel

- file:
    path: /srv/retrace/repos
    state: directory
    mode: 0755
    owner: retrace
    group: retrace

- file:
    path: /srv/retrace/tasks
    state: directory
    mode: 0755
    owner: retrace
    group: retrace

- file:
    path: /srv/retrace/hardlink-local
    state: directory
    mode: 0755
    owner: retrace
    group: retrace
