Skip to content

Commit 3b42b0b

Browse files
committed
Improved composer update/install
1 parent 8298a88 commit 3b42b0b

File tree

1 file changed

+9
-0
lines changed
  • provision/roles/boilerplate-main/tasks/bootstrap

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
---
22

3+
- stat: path=/usr/local/bin/composer
4+
register: composer_bin
5+
6+
- name: Update composer (phar)
7+
command: 'composer self-update'
8+
when: composer_bin.stat.exists is defined and composer_bin.stat.exists
9+
310
- name: Install composer (phar)
411
raw: 'curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer'
12+
when: composer_bin.stat.exists is defined and not composer_bin.stat.exists
13+

0 commit comments

Comments
 (0)