---

- name: Create directories
  file: path={{ item.dir }} state=directory owner={{ item.owner | default(omit) }} group={{ item.group | default(omit) }} mode={{ item.mode | default(omit) }}
  loop:
    - dir: "{{ rpm_root_dir }}"
    - dir: "{{ rpm_root_dir }}/mock"
    - dir: "{{ rpm_root_dir }}/cache"
    - dir: "{{ rpm_root_dir }}/cache/mock"
    - dir: "{{ rpm_root_dir }}/cache/repo"
    - dir: "{{ rpm_root_dir }}/repo"
    - dir: "{{ rpm_root_dir }}/bin"
    - dir: "{{ rpm_root_dir }}/uploads/el7"
    - dir: "{{ rpm_root_dir }}/uploads/el8"
    - dir: "{{ rpm_root_dir }}/uploads/el9"
    - dir: "{{ rpm_root_dir }}/errors"
    - dir: "{{ rpm_root_dir }}/builds"
    - dir: "{{ rpm_root_dir }}/etc"
  tags: rpm
