---

- name: Create directories
  file: path={{ item.dir }} state=directory mode={{ item.mode | default(omit) }}
  loop:
    - dir: "{{ cni_root_dir }}"
    - dir: "{{ cni_root_dir }}/bin"
    - dir: "{{ cni_root_dir }}/archives"
    - dir: "{{ cni_root_dir }}/meta"
      mode: 700
    - dir: "{{ cni_root_dir }}/tmp"
      mode: 700
  tags: cni
