Created
March 22, 2014 00:57
-
-
Save willthames/9699529 to your computer and use it in GitHub Desktop.
NPM improvements
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- hosts: localhost | |
connection: local | |
tasks: | |
- npm: name="{{item}}" path="{{installdir}}/A" global=no | |
with_items: | |
- hubot | |
- coffee-script | |
- npm: name="{{item}}" path="{{installdir}}/B" global=no | |
with_items: | |
- coffee-script | |
- hubot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[will@cheetah ansible]$ cat npm_test_toplevel.yml | |
- hosts: localhost | |
connection: local | |
tasks: | |
- npm: name="{{item}}" path="{{installdir}}/A" global=no toplevel=yes | |
with_items: | |
- hubot | |
- coffee-script | |
- npm: name="{{item}}" path="{{installdir}}/B" global=no toplevel=yes | |
with_items: | |
- coffee-script | |
- hubot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[will@cheetah ansible]$ ansible-playbook npm_test_toplevel.yml -e installdir=/tmp/nodejs | |
PLAY [localhost] ************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [127.0.0.1] | |
TASK: [npm name="{{item}}" path="{{installdir}}/A" global=no toplevel=yes] **** | |
changed: [127.0.0.1] => (item=hubot) | |
changed: [127.0.0.1] => (item=coffee-script) | |
TASK: [npm name="{{item}}" path="{{installdir}}/B" global=no toplevel=yes] **** | |
changed: [127.0.0.1] => (item=coffee-script) | |
changed: [127.0.0.1] => (item=hubot) | |
PLAY RECAP ******************************************************************** | |
127.0.0.1 : ok=3 changed=2 unreachable=0 failed=0 | |
[will@cheetah ansible]$ ansible-playbook npm_test_toplevel.yml -e installdir=/tmp/nodejs | |
PLAY [localhost] ************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [127.0.0.1] | |
TASK: [npm name="{{item}}" path="{{installdir}}/A" global=no toplevel=yes] **** | |
ok: [127.0.0.1] => (item=hubot) | |
ok: [127.0.0.1] => (item=coffee-script) | |
TASK: [npm name="{{item}}" path="{{installdir}}/B" global=no toplevel=yes] **** | |
ok: [127.0.0.1] => (item=coffee-script) | |
ok: [127.0.0.1] => (item=hubot) | |
PLAY RECAP ******************************************************************** | |
127.0.0.1 : ok=3 changed=0 unreachable=0 failed=0 | |
[will@cheetah ansible]$ ls /tmp/nodejs/A/node_modules/.bin/ | |
cake coffee hubot | |
[will@cheetah ansible]$ ls /tmp/nodejs/B/node_modules/.bin/ | |
cake coffee hubot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[will@cheetah ansible]$ ansible-playbook npm_test.yml -e installdir=/tmp/nodejs | |
PLAY [localhost] ************************************************************** | |
GATHERING FACTS *************************************************************** | |
ok: [127.0.0.1] | |
TASK: [npm name="{{item}}" path="{{installdir}}/A" global=no] ***************** | |
changed: [127.0.0.1] => (item=hubot) | |
ok: [127.0.0.1] => (item=coffee-script) | |
TASK: [npm name="{{item}}" path="{{installdir}}/B" global=no] ***************** | |
changed: [127.0.0.1] => (item=coffee-script) | |
changed: [127.0.0.1] => (item=hubot) | |
PLAY RECAP ******************************************************************** | |
127.0.0.1 : ok=3 changed=2 unreachable=0 failed=0 | |
[will@cheetah ansible]$ ls /tmp/nodejs/A/node_modules/.bin | |
hubot | |
[will@cheetah ansible]$ ls /tmp/nodejs/B/node_modules/.bin | |
cake coffee hubot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment