2025-06-15 08:36:54 +08:00

25 lines
809 B
YAML

---
- name: "Install yq (YAML processor) for the smart composer script"
ansible.builtin.get_url:
url: "https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64"
dest: /usr/local/bin/yq
mode: '0755'
- name: "Download the Composer installer"
ansible.builtin.get_url:
url: https://getcomposer.org/installer
dest: /tmp/composer-installer.php
mode: '0755'
- name: "Install Composer globally (as composer.phar)"
ansible.builtin.command:
cmd: php /tmp/composer-installer.php --install-dir=/usr/local/bin --filename=composer.phar
creates: /usr/local/bin/composer.phar
- name: "Deploy the smart Composer wrapper script"
ansible.builtin.template:
src: composer-wrapper.sh.j2
dest: /usr/local/bin/composer
owner: root
group: root
mode: '0755'