diff --git a/README.md b/README.md index 000b503ae657da11a5d73f2c2f809b0e5b02d820..9b6428b152698dcb9d7d158c6b47527742f4977a 100755 --- a/README.md +++ b/README.md @@ -13,10 +13,15 @@ Installs Composer, the PHP Dependency Manager. composer_path: /usr/local/bin/composer composer_update: true composer_update_day: 20 + composer_php_bin: php The path where composer will be installed and available to your system. Should be in your user's `$PATH` so you can run commands simply with `composer` instead of the full path. +You can specify where is php with `composer_php_bin` variable. For exemple : + + composer_php_bin: /usr/local/zend/bin/php + ## Example Playbook roles: diff --git a/defaults/main.yml b/defaults/main.yml index d52bffcaf03568cc0fec2b0835bbc64d9bba7bf2..5020fb995675c7527331fa25ad16519240787ead 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,3 +3,4 @@ composer_path: /usr/local/bin/composer composer_update: true composer_update_day: 20 +composer_php_bin: php diff --git a/tasks/install.yml b/tasks/install.yml index 5a32c4b36232203c63c63b39d1ad3654533ab83e..a831c2fa2c269052f77b1fa7779016bdfe826905 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -2,7 +2,7 @@ - name: Download and install Composer into the current directory. shell: - php -r "readfile('https://getcomposer.org/installer');" | php + echo; {{ composer_php_bin }} -r "readfile('https://getcomposer.org/installer');" | {{ composer_php_bin }} creates={{ composer_path }} - name: Move Composer into bin directory.