---

- name: Ensure that the application file permissions are set properly
  file: path={{ server_root_dir }}
        recurse=yes
        owner={{ gunicorn_user }}
        group={{ gunicorn_group }}
        state=directory
  notify: restart application

- name: Ensure that the static file permissions are set properly
  file: path={{ nginx_static_dir }}
        recurse=yes
        owner={{ gunicorn_user }}
        group={{ gunicorn_group }}
        state=directory


- name: Ensure that the media file permissions are set properly
  file: path={{ nginx_media_dir }}
        recurse=yes
        owner={{ gunicorn_user }}
        group={{ gunicorn_group }}
        state=directory

---

- name: Ensure that the application file permissions are set properly
  file: path={{ server_root_dir }}
        recurse=yes
        owner={{ gunicorn_user }}
        group={{ gunicorn_group }}
        state=directory
  notify: restart application

- name: Ensure that the static file permissions are set properly
  file: path={{ nginx_static_dir }}
        recurse=yes
        owner={{ gunicorn_user }}
        group={{ gunicorn_group }}
        state=directory


- name: Ensure that the media file permissions are set properly
  file: path={{ nginx_media_dir }}
        recurse=yes
        owner={{ gunicorn_user }}
        group={{ gunicorn_group }}
        state=directory

- name: Ensure that the department thumbnails folder exists
  file: path=/home/{{ gunicorn_user }}/department-thumbnails
        owner={{ gunicorn_user }}
        group={{ gunicorn_group }}
        state=directory

Create the department-thumbnails folder with correct permissions.
Create the department-thumbnails folder with correct permissions.
