Skip to content
Snippets Groups Projects
Commit 33d7bc23 authored by Simon Constans's avatar Simon Constans
Browse files

Merge remote-tracking branch 'yoshz/feature/global_require'

Conflicts:
	README.md
parents c82bf858 abcd05ae
Branches
Tags
No related merge requests found
......@@ -25,10 +25,10 @@ You can specify where is php with `env_proxy` variable. For example :
You can also setup a global composer directory and make the bin directory available in the `$PATH` automatically by:
composer_home_path: /var/data/composer
composer_home_owner: kosssi
composer_home_group: kosssi
composer_path_env: true
composer_home_path: /opt/composer
composer_home_owner: root
composer_home_group: root
composer_global_packages:
phpunit/phpunit: "@stable"
......
......@@ -3,9 +3,9 @@
composer_path: /usr/local/bin/composer
composer_update: true
composer_update_day: 20
composer_home_path: ~
composer_path_env: False
#composer_home_path: /opt/composer
composer_home_owner: root
composer_home_group: root
composer_path_env: False
composer_global_packages: {}
proxy_env: {}
......@@ -2,12 +2,12 @@
- name: Create composer home path
file: path={{ composer_home_path }} state=directory owner={{ composer_home_owner }} group={{ composer_home_group }}
when: composer_home_path
when: composer_home_path is defined
- name: Configure composer home path
copy: dest=/etc/profile.d/composer-home.sh mode=0755
content="export COMPOSER_HOME={{ composer_home_path}}\n"
when: composer_home_path
when: composer_home_path is defined
- name: Configure composer path environment
copy: dest=/etc/profile.d/composer-path.sh mode=0755
......@@ -15,7 +15,8 @@
when: composer_path_env
- name: Global require packages
shell: composer global require {{ item.key }}:{{ item.value }} --no-progress
shell: COMPOSER_HOME={{ composer_home_path|default('~/.composer') }}
composer global require {{ item.key }}:{{ item.value }} --no-progress
creates={{ composer_home_path|default('~/.composer') }}/vendor/{{ item.key }}
with_dict: composer_global_packages
when: composer_global_packages|length > 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment