---

# Install composer and drush.

- name: Install composer
  shell: curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/bin/composer
    creates=/usr/bin/composer

- name: Make sure /usr/lib/composer exists
  action: file path=/usr/lib/composer state=directory

- name: Ensure composer cache is writeable
  file:
    path: /usr/lib/composer/cache
    mode: 0777
    recurse: yes

- name: Set up composer environment variables
  template: src=composer.sh.j2 dest=/etc/profile.d/composer.sh

- name: Install drush
  shell: source /etc/profile.d/composer.sh && cd /usr/lib/composer && composer global require drush/drush:{{ drush.version }} && drush
    creates=/usr/bin/drush

- name: Install prestissimo
  shell: source /etc/profile.d/composer.sh && cd /usr/lib/composer && composer global require "hirak/prestissimo:^0.3"

---

# Install composer and drush.

- name: Install composer
  shell: curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/bin/composer
    creates=/usr/bin/composer

- name: Make sure /usr/lib/composer exists
  action: file path=/usr/lib/composer state=directory

- name: Set up composer environment variables
  template: src=composer.sh.j2 dest=/etc/profile.d/composer.sh

- name: Install drush
  shell: source /etc/profile.d/composer.sh && cd /usr/lib/composer && composer global require drush/drush:{{ drush.version }} && drush
    creates=/usr/bin/drush

- name: Install prestissimo
  shell: source /etc/profile.d/composer.sh && cd /usr/lib/composer && composer global require "hirak/prestissimo:^0.3"

- name: Ensure composer cache is writeable
  file:
    path: /usr/lib/composer/cache
    state: directory
    mode: 0777
    recurse: yes



Make composer cache writeable after installing everything as root.
Make composer cache writeable after installing everything as root.
