Skip to content

Instantly share code, notes, and snippets.

@onlime
Created August 21, 2021 23:24
Show Gist options
  • Save onlime/8767e4e86d4205e32fbe354c8bea626c to your computer and use it in GitHub Desktop.
Save onlime/8767e4e86d4205e32fbe354c8bea626c to your computer and use it in GitHub Desktop.
Small Ansible playbook to install latest-stable Composer
- hosts: webservers
tasks:
# Install Composer the lightweight way (without using installer)
# https://getcomposer.org/download
- name: Composer | Install Composer latest-stable
get_url:
url: https://getcomposer.org/download/latest-stable/composer.phar
checksum: 'sha256:https://getcomposer.org/download/latest-stable/composer.phar.sha256sum'
dest: /usr/local/bin/composer.phar
mode: 0755
- name: Composer | Symlink composer.phar
file:
src: composer.phar
dest: /usr/local/bin/composer
state: link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment