geerlingguy / ansible-role-nodejs

Ansible Role - Node.js
https://galaxy.ansible.com/geerlingguy/nodejs/
MIT License
410 stars 252 forks source link

Installing a specific version - possible fix #89

Closed pedrocaseiro closed 4 years ago

pedrocaseiro commented 5 years ago

Hi @geerlingguy. First of all, thanks for this role, it's been really useful!

So a few days ago Heroku changed their default node version for ruby apps to be 10.14.1 (https://devcenter.heroku.com/changelog-items/1543), but the app I'm maintaining is running on 6.9.5. I dug a bit through the repo's code and issues and found out that you can't specify a node subversion, so it will always default to the most recent subversion of whatever version you specify (https://github.com/geerlingguy/ansible-role-nodejs/issues/50), so I started to wonder why. If I'm not mistaken (please correct me if I am), the source of this "problem" is nodesource (https://github.com/nodesource/distributions/issues/33). They're not keeping older versions of node available, just the latest subversion of each version.

After digging through nodesource a bit, I found that they actually keep all the versions, just in different URL's. For instance, the one I'm looking for can be found at https://deb.nodesource.com/node_6.x/pool/main/n/nodejs/ (nodejs-dbg_6.9.5-1nodesource1~jessie1_amd64.deb this is the filename).

So my idea is: is it possible to accept a new role variable like nodejs_version_url that overrides the nodejs_version one and downloads it straight from whatever source you pass it? If you think this is useful I would be available to give it a try.

Thanks and sorry for the wall of text, I hope I've made myself clear :)

stale[bot] commented 4 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 4 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.