nodejs gets upgraded if defined version is lower than OS version
damosc opened this issue · comments
Steps to reproduce
- define
nodejs_version: "14.x"
- run playbook on Debian 12 (bookworm)
node --version
returns something like v14.X.Y- run
apt upgrade
on the machine node --version
returns something like v18.X.Y
Expected result
apt upgrade
should not upgrade nodejs package, even if the defined nodejs_version
is lower than the one that comes per default with operating system.
Possible solution
I'm not sure how good it is, but I solved it with
- name: prevent nodejs package from being upgraded
ansible.builtin.dpkg_selections:
name: nodejs
selection: hold
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.