diff --git a/roles/bootstrap/tasks/install_node.yaml b/roles/bootstrap/tasks/install_node.yaml index 26d08c2..6469cb0 100644 --- a/roles/bootstrap/tasks/install_node.yaml +++ b/roles/bootstrap/tasks/install_node.yaml @@ -1,14 +1,17 @@ --- +- name: Set NodeJS major version variable + ansible.builtin.set_fact: + node_major_version: "18" - name: Add nodejs apt key ansible.builtin.apt_key: url: https://deb.nodesource.com/gpgkey/nodesource.gpg.key state: present - name: Add nodejs 18.x ppa for apt repo ansible.builtin.apt_repository: - repo: deb https://deb.nodesource.com/node_18.x bullseye main + repo: "deb https://deb.nodesource.com/node_{{ node_major_version }}.x bullseye main" update_cache: true - name: Install nodejs ansible.builtin.apt: update_cache: true name: nodejs - state: present + state: latest