Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding nvm role #94

Merged
merged 1 commit into from
Feb 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions roles/nvm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
- name: "NVM | Download Latest Version JSON"
ansible.builtin.uri:
url: https://api.github.com/repos/nvm-sh/nvm/releases/latest
register: nvm_latest_version_json
changed_when: false

- name: "NVM | Registering NVM Latest Release"
ansible.builtin.set_fact:
nvm_latest_release: "{{ nvm_latest_version_json.json.tag_name }}"

- name: "NVM | Registering NVM Latest Version"
ansible.builtin.set_fact:
nvm_latest_version: "{{ nvm_latest_release.stdout | default('') }}"

- name: NVM | Show nvm_latest_release debug
ansible.builtin.debug:
var: nvm_latest_release

- name: Install nvm
ansible.builtin.shell: >
set -o pipefail && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/{{ nvm_latest_release }}/install.sh | bash
args:
creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"
executable: /bin/bash

Loading