---

- name: Create directories
  file: path={{ item.path }} state=directory owner={{ item.owner | default(omit) }} group={{ item.group | default(omit) }} mode={{ item.mode | default(omit) }}
  with_items:
    - path: "{{ odoo_root_dir }}"
      owner: "{{ odoo_user }}"
      mode: 775
    - path: "{{ odoo_root_dir }}/tmp"
    - path: "{{ odoo_root_dir }}/meta"
      mode: 700
    - path: "{{ odoo_root_dir }}/etc"
      group: "{{ odoo_user }}"
      mode: 750
    - path: "{{ odoo_root_dir }}/app"
    - path: "{{ odoo_root_dir }}/backup"
      mode: 700
    - path: "{{ odoo_root_dir }}/data"
      group: "{{ odoo_user }}"
      mode: 770
    - path: "{{ odoo_root_dir }}/enterprise"
  tags: odoo

