Validate that node_version is set

We removed the default value, because having a default value actually
makes no sense at all. To be helpful for any transitions, add a runtime
check that the variable is set.

Also, while we're at it, update the docs to indicate that the parameter
is required.

Change-Id: I1e18ea51d9d56561608ff241d71b63965c4f78bd
This commit is contained in:
Monty Taylor 2024-06-03 12:28:38 -07:00
parent efa55f881d
commit e188ce71ca
2 changed files with 6 additions and 1 deletions

View File

@ -3,4 +3,5 @@ Install NodeJS from nodesource
**Role Variables**
.. zuul:rolevar:: node_version
:default: 6
Required. What version of Node to install.

View File

@ -1,3 +1,7 @@
- name: Ensure we know what version of node to install
assert:
that: node_version is defined
- name: Update apt cache
apt:
update_cache: yes