---
- apt: name={{ item }}
  with_items:
    - build-essential
    - php5-curl
    - php5-mysql
    - python-mysqldb  # Required for mysql ansible modules
- { include: install_dependencies.yml, sudo: no }
- cron: name='Update API data' special_time=hourly job='cd {{ project_dir }}/api && grunt ay2014to2015sem1 rsync' user={{ user }}
- mysql_db: name={{ yourls_db_name }}
- mysql_user:
    name={{ yourls_db_user }}
    password={{ yourls_db_pass }}
    priv={{ yourls_db_name }}.*:ALL
- template:
    src=etc/nginx/sites-available/{{ item }}.j2
    dest=/etc/nginx/sites-available/{{ item }}
  with_items: domains
- file:
    src=/etc/nginx/sites-available/{{ item }}
    dest=/etc/nginx/sites-enabled/{{ item }}
    state=link
  with_items: domains
  notify: reload nginx

---
- apt: name={{ item }}
  with_items:
    - build-essential
    - php5-curl
    - php5-mysql
    - python-mysqldb  # Required for mysql ansible modules
- { include: install_dependencies.yml, sudo: no }
- cron: name='Update API data' special_time=hourly job='cd {{ project_dir }}/api && grunt ay2014to2015sem1 rsync --target=dist' user={{ user }}
- mysql_db: name={{ yourls_db_name }}
- mysql_user:
    name={{ yourls_db_user }}
    password={{ yourls_db_pass }}
    priv={{ yourls_db_name }}.*:ALL
- template:
    src=etc/nginx/sites-available/{{ item }}.j2
    dest=/etc/nginx/sites-available/{{ item }}
  with_items: domains
- file:
    src=/etc/nginx/sites-available/{{ item }}
    dest=/etc/nginx/sites-enabled/{{ item }}
    state=link
  with_items: domains
  notify: reload nginx

Add --target=dist to generate API json files without whitespace
Add --target=dist to generate API json files without whitespace
