-
-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create global install dir #28
Conversation
@@ -18,7 +18,11 @@ The Node.js version to install. "0.10" is the default and works on all supported | |||
|
|||
nodejs_install_npm_user: "{{ ansible_ssh_user }}" | |||
|
|||
The user for whom the npm packages will be installed can be set here, this defaults to ansible_ssh_user | |||
The user for whom the npm packages will be installed can be set here, this defaults to ansible_user |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ansible 2.0 has deprecated the “ssh” from ansible_ssh_user, ansible_ssh_host, and ansible_ssh_port to become ansible_user, ansible_host -- http://docs.ansible.com/ansible/faq.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were they added in 2.0, meaning does it bump requirement to 2.0? We need to fix this over at Drupal VM as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to bump to 2.0 at this point; there are few (if any) reasons for people to still be on 1.9.x.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could possibly be changed to drop the dependency on ansible_user
as tasks are run as this user by default.
Often the issue is that the task is run in the context of become: yes
(sudo) so root user perms are used.
eg.
ansible localhost -c local -m shell -a whoami
ansible localhost -c local -m shell -a whoami --become
Ready for review. |
87d4b18
to
dfcd192
Compare
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm npm list -g --depth=0 yo' | ||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm NPM_CONFIG_PREFIX=/root/.npm-global NODE_PATH=/root/.npm-global/lib/node_modules npm list -g --depth=0 jslint' | ||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm NPM_CONFIG_PREFIX=/root/.npm-global NODE_PATH=/root/.npm-global/lib/node_modules npm list -g --depth=0 node-sass' | ||
- 'sudo docker exec --tty "$(cat ${container_id})" env TERM=xterm NPM_CONFIG_PREFIX=/root/.npm-global NODE_PATH=/root/.npm-global/lib/node_modules npm list -g --depth=0 yo' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be tested by wrapping everything in bash --login -c
?
710ccc3
to
bc45c36
Compare
This PR will install NPM allowing installation of global packages without root access, which is recommended based on Option 2 -- https://docs.npmjs.com/getting-started/fixing-npm-permissions
Option 1 would require changing permissions of
/usr
.Should help resolve geerlingguy/drupal-vm#629 & beetboxvm/beetbox#207