---
  - name: Use Default Configuration Files
    copy: src="{{ www_base }}/app/config/{{ item }}.conf.sample.php" dest="{{ www_base }}/app/config/{{ item }}.conf.php" force=no
    with_items:
     - db
     - influx
     - cache

  - name: Write current environment to file.
    copy: content="{{ app_env }}" dest="{{ www_base }}/app/.env"

  - name: Touch .deploy_run file
    file: path="{{ app_base }}/.deploy_run" state=touch

  - name: Set Permissions on Base App Folder
    file: path="{{ item }}" state=directory owner=azuracast group=www-data
    with_items:
     - "{{ app_base }}"

  - name: Create System Folders
    file: path="{{ item }}" state=directory owner=azuracast group=www-data mode=0777
    with_items:
     - "{{ tmp_base }}"
     - "{{ tmp_base }}/cache"
     - "{{ tmp_base }}/sessions"
     - "{{ tmp_base }}/proxies"
     - "{{ app_base }}/stations"
     - "{{ app_base }}/servers"
     - "{{ app_base }}/servers/shoutcast2"
     - "{{ app_base }}/servers/icecast2"
---
  - name: Use Default Configuration Files
    copy: src="{{ www_base }}/app/config/{{ item }}.conf.sample.php" dest="{{ www_base }}/app/config/{{ item }}.conf.php" force=no
    with_items:
     - db
     - influx
     - cache

  - name: Write current environment to file.
    copy: content="{{ app_env }}" dest="{{ www_base }}/app/.env"

  - name: Touch .deploy_run file
    file: path="{{ app_base }}/.deploy_run" state=touch

  - name: Set Permissions on Base App Folder
    file: path="{{ item }}" state=directory owner=azuracast group=www-data
    with_items:
     - "{{ app_base }}"

  - name: Create System Folders
    file: path="{{ item }}" state=directory owner=azuracast group=www-data mode=0777
    with_items:
     - "{{ tmp_base }}"
     - "{{ tmp_base }}/cache"
     - "{{ tmp_base }}/sessions"
     - "{{ tmp_base }}/proxies"
     - "{{ app_base }}/stations"
     - "{{ app_base }}/servers"
     - "{{ app_base }}/servers/shoutcast2"
     - "{{ app_base }}/servers/icecast2"
     - "{{ app_base }}/.opam"
Add OPAM folder permissions for CI process.
Add OPAM folder permissions for CI process.
