- name: chmod and chown local orchard folder
  file: dest="{{ orchard_api_document_root }}" owner=www-data group=www-data mode=777 recurse=yes
  when: inventory_hostname == "localhost"
  tags:
    - orchard-api-init
    - orchard-api-init-chmod
- name: chmod and chown orchard folder
  file: dest="{{ orchard_api_document_root }}" owner="{{ server_files_user }}" group="{{ server_files_group }}" mode=775 recurse=yes
  when: inventory_hostname == "dev_client"
  become: true
  tags:
    - orchard-api-init
    - orchard-api-init-chmod

- name: chmod and chown Proxies folder
  file: dest="{{ orchard_api_document_root }}/application/Proxies" owner="{{ server_files_user }}" group="{{ server_files_group }}" mode=777 recurse=yes
  when: inventory_hostname == "dev_client"
  become: true
  tags:
    - orchard-api-init
    - orchard-api-init-chmod
