---
#
# thanks to https://www.devopsaurus.com/install-composer-with-ansible/
#
- name: Download and install Composer
  get_url:
    checksum: "sha256:{{ composer_sum }}"
    dest: /usr/src/
    url: https://getcomposer.org/download/{{ composer_version }}/composer.phar

- name: Add Composer to global path
  copy: 
    dest: /usr/local/bin/composer
    group: root
    mode: '0755'
    owner: root
    src: /usr/src/composer.phar
    remote_src: yes
