You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
915 B

  1. ---
  2. - name: Install PHP Composer
  3. collections: [ 'debops.debops', 'debops.roles01',
  4. 'debops.roles02', 'debops.roles03' ]
  5. hosts: [ 'debian10' ]
  6. tasks:
  7. - name: Download and install composer
  8. when: (php_version is defined)
  9. shell: |-
  10. php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  11. php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  12. php composer-setup.php
  13. php -r "unlink('composer-setup.php');"
  14. mv composer.phar /usr/local/bin/composer
  15. - name: Download and install composer
  16. when: (php_version is defined and php_version == '7.4')
  17. shell: |-
  18. composer self-update 1.10.27