This commit is contained in:
uumas
2022-04-22 12:47:02 +03:00
parent 70cb4bca0d
commit 758e85b2ac
4 changed files with 100 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
---
- name: Test if composer is installed system-wide
stat:
path: /usr/bin/composer
register: global_composer
- block:
- name: Download latest version of composer locally
get_url:
url: https://getcomposer.org/download/latest-stable/composer.phar
dest: "{{ ansible_user_dir }}/.local/bin/composer"
mode: 0755
- name: Set composer path to use local installation
set_fact:
composer_path: "{{ ansible_user_dir }}/.local/bin/composer"
when: not global_composer.stat.exists