diff --git a/README.md b/README.md index 9b6428b152698dcb9d7d158c6b47527742f4977a..ddd0e1b38da288010973a495161b322afd2bcb62 100755 --- a/README.md +++ b/README.md @@ -13,14 +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 + env_proxy: {} 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 : +You can specify where is php with `env_proxy` variable. For exemple : - composer_php_bin: /usr/local/zend/bin/php + env_proxy: + PATH: "/usr/local/zend/bin" ## Example Playbook diff --git a/defaults/main.yml b/defaults/main.yml index 5020fb995675c7527331fa25ad16519240787ead..0305cdfd5fb94b705525c9f3f55b21237bee511b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -3,4 +3,4 @@ composer_path: /usr/local/bin/composer composer_update: true composer_update_day: 20 -composer_php_bin: php +proxy_env: {} diff --git a/tasks/install.yml b/tasks/install.yml index a831c2fa2c269052f77b1fa7779016bdfe826905..99d64f7a6ef2f72cd8c4660b0267076a41bbf45b 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -2,8 +2,9 @@ - name: Download and install Composer into the current directory. shell: - echo; {{ composer_php_bin }} -r "readfile('https://getcomposer.org/installer');" | {{ composer_php_bin }} + php -r "readfile('https://getcomposer.org/installer');" | php creates={{ composer_path }} + environment: proxy_env - name: Move Composer into bin directory. shell: