diff --git a/LICENSE b/LICENSE index c35790f8e0d4bb03ac40a74222c6f7ed83f0f1b9..d43ce64a203593bd6b1702a8566ca0f0da46779f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2014 Simon Constans +Copyright (c) 2014-2015 Simon Constans Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 19cf1b6393812f53fa7822952eafe30700630fab..7b53b1d48c214c908c83657881fc3b2108cd308a 100755 --- a/README.md +++ b/README.md @@ -1,28 +1,19 @@ # ansible-role-composer +[](https://github.com/kosssi/ansible-role-composer/blob/master/LICENSE) [](https://travis-ci.org/kosssi/ansible-role-composer) Installs Composer, the PHP Dependency Manager. -## Requirements - -- php (version 5.3+) should be installed. - ## Role Defaults Variables composer_path: /usr/local/bin/composer composer_update: true composer_update_day: 20 - 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 `env_proxy` variable. For example : - - env_proxy: - PATH: "/usr/local/zend/bin" - You can also setup a global composer directory and make the bin directory available in the `$PATH` automatically by: composer_path_env: true @@ -49,19 +40,17 @@ To prevent that, you must configure github oauth token to go over the API rate l roles: - { role: kosssi.composer } -## Vagrant +## Tests If you have vagrant, you can test this role: cd tests vagrant up + vagrant provision ## Special thanks to contributors * [jnakatsui](https://github.com/jnakatsui) -* [yoshz](https://github.com/yoshz) -* [jrobeson](https://github.com/jrobeson) - -## License - -Licensed under the MIT License. See the [LICENSE](LICENSE) file for details. +* [Yosh](https://github.com/yoshz) +* [Johnny Robeson](https://github.com/jrobeson) +* [Sebastian Krebs](https://github.com/KingCrunch) diff --git a/defaults/main.yml b/defaults/main.yml index a67744c75bd0998c7be806af22ee336b012abe2b..935432fd0ce3aa3684b481a56180a4e093fb506b 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,7 +8,6 @@ composer_path_env: False composer_home_owner: root composer_home_group: root composer_global_packages: {} -proxy_env: {} # Visit https://github.com/settings/applications # and generate personal access token diff --git a/tasks/install.yml b/tasks/install.yml index f1edc156f6d24e2def14814a5f80b6e9b992607f..a5d7b7e033224b01a038849acfb33c7d3f656190 100644 --- a/tasks/install.yml +++ b/tasks/install.yml @@ -1,8 +1,7 @@ --- - name: Download and install Composer into the target directory. - shell: - php -r "readfile('https://getcomposer.org/installer');" | - php -- --install-dir={{ composer_path|dirname }} --filename={{ composer_path|basename }} - creates={{ composer_path }} - environment: proxy_env + get_url: + url=https://getcomposer.org/composer.phar + dest={{ composer_path }} + mode=0755