Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
composer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
composer
Commits
33d7bc23
Commit
33d7bc23
authored
10 years ago
by
Simon Constans
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'yoshz/feature/global_require'
Conflicts: README.md
parents
c82bf858
abcd05ae
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+3
-3
3 additions, 3 deletions
README.md
defaults/main.yml
+2
-2
2 additions, 2 deletions
defaults/main.yml
tasks/configure.yml
+4
-3
4 additions, 3 deletions
tasks/configure.yml
with
9 additions
and
8 deletions
README.md
+
3
−
3
View file @
33d7bc23
...
...
@@ -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"
...
...
This diff is collapsed.
Click to expand it.
defaults/main.yml
+
2
−
2
View file @
33d7bc23
...
...
@@ -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
:
{}
This diff is collapsed.
Click to expand it.
tasks/configure.yml
+
4
−
3
View file @
33d7bc23
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment