---

- name: Composer | Test if existing file
  action: shell test -f /usr/local/bin/composer && echo "exist" || echo ""
  register: is_file_created

- name: Composer | Install composer.phar
  command: php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
  when: ${is_file_created.stdout} != "exist"

- name: Composer | Rename composer.phar to composer
  command: mv composer.phar /usr/local/bin/composer
  when: ${is_file_created.stdout} != "exist"

- name: Composer | Update composer
  command: /usr/local/bin/composer self-update
  when: ${is_file_created.stdout} == "exist"
---

- name: Composer | Test if existing file
  shell: test -f /usr/local/bin/composer && echo "exist" || echo ""
  register: is_file_created

- name: Composer | Install composer.phar
  command: php -r "eval('?>'.file_get_contents('https://getcomposer.org/installer'));"
  when: {{ is_file_created.stdout }} != "exist"

- name: Composer | Rename composer.phar to composer
  command: mv composer.phar /usr/local/bin/composer
  when: {{ is_file_created.stdout }} != "exist"

- name: Composer | Update composer
  command: /usr/local/bin/composer self-update
  when: {{ is_file_created.stdout }} == "exist"
Fix bug with version ansible
Fix bug with version ansible
