--- # file: tasks/set-role-variables.yml # set necessary role variables. # - name: set nodejs_version, if neither version variables are defined set_fact: nodejs_version: "{{ nodejs_default_in_apt }}" when: nodejs_version is not defined and iojs_version is not defined and ansible_pkg_mgr == "apt" - name: set nodejs_version, if neither version variables are defined set_fact: nodejs_version: "{{ nodejs_default_in_yum }}" when: nodejs_version is not defined and iojs_version is not defined and ansible_pkg_mgr == "yum"