Skip to content
This repository was archived by the owner on Nov 21, 2020. It is now read-only.
This repository was archived by the owner on Nov 21, 2020. It is now read-only.

Support version switching #9

@fago

Description

@fago

When the role is installed initially with nodejs 6.x, and the variable is changed to 4.x later on, then it fails to install nodejs in 4.*. This is, as the role just adds a second ppa but apt keeps the higher version package installed.

As workaround I figured that a task like

- name: Ensure Node.js and npm are installed.
  become: yes
  apt: "name=nodejs={{ nodejs_version|regex_replace('x', '') }}* state=present"

solves it. It still keeps both ppas around, but at least the right version of nodejs is installed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions