Delete nvm role

Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
2024-04-12 14:50:28 +02:00
parent e9efb2dfa8
commit 613c54b5bb
13 changed files with 0 additions and 113 deletions

View File

@@ -1,2 +0,0 @@
---
# defaults file for nvm

View File

View File

@@ -1,2 +0,0 @@
---
# handlers file for nvm

View File

@@ -1,20 +0,0 @@
# ===================================================================================================
# ? ABOUT
# @author : Noah Knegt
# @email : personal@noahknegt.com
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
# @createdOn : 06-04-2023
# @description : This will check if nvm is installed as the latest version.
# ===================================================================================================
---
- name: Check nvm version
shell: nvm --version
become: true
become_user: noahk
become_method: su
become_flags: '--login'
vars:
ansible_become_pass: "{{ noahk_password }}"
register: nvm_version
ignore_errors: true

View File

@@ -1,22 +0,0 @@
# ===================================================================================================
# ? ABOUT
# @author : Noah Knegt
# @email : personal@noahknegt.com
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
# @createdOn : 06-04-2023
# @description : This will cleanup the system.
# ===================================================================================================
---
- name: Cleanup
file:
path: "{{ item }}"
state: absent
with_items:
- /tmp/nvm-install.sh
- /tmp/nvm-install.log
- /tmp/nvm-install.out
- /tmp/nvm-install.err
- /tmp/nvm-install.debug
- /tmp/nvm-install.info
- /tmp/nvm-install.warn

View File

@@ -1,16 +0,0 @@
# ===================================================================================================
# ? ABOUT
# @author : Noah Knegt
# @email : personal@noahknegt.com
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
# @createdOn : 06-04-2023
# @description : This will download the nvm install script.
# ===================================================================================================
---
- name: Download nvm
get_url:
url: https://raw.githubusercontent.com/nvm-sh/nvm/{{ nvm_latest_version.stdout }}/install.sh
dest: /tmp/nvm-install.sh
mode: 0755
when: nvm_version.stdout != nvm_latest_version.stdout or nvm_version.stdout == ""

View File

@@ -1,13 +0,0 @@
# ===================================================================================================
# ? ABOUT
# @author : Noah Knegt
# @email : personal@noahknegt.com
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
# @createdOn : 06-04-2023
# @description : This will get the latest version of nvm.
# ===================================================================================================
---
- name: Get the latest nvm version
shell: curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | grep tag_name | cut -d '"' -f 4
register: nvm_latest_version

View File

@@ -1,19 +0,0 @@
# ===================================================================================================
# ? ABOUT
# @author : Noah Knegt
# @email : personal@noahknegt.com
# @repo : https://git.noahknegt.com/noah.knegt/ansible-automations
# @createdOn : 06-04-2023
# @description : This will install nvm as the latest version.
# ===================================================================================================
---
- name: Install nvm
shell: /tmp/nvm-install.sh
become: true
become_user: noahk
become_method: su
become_flags: '--login'
vars:
ansible_become_pass: "{{ noahk_password }}"
when: nvm_version.stdout != nvm_latest_version.stdout or nvm_version.stdout == ""

View File

@@ -1,9 +0,0 @@
---
- import_tasks: check_installed.yml
- import_tasks: get_version.yml
- import_tasks: download.yml
- import_tasks: install.yml
- import_tasks: cleanup.yml

View File

@@ -1,2 +0,0 @@
localhost

View File

@@ -1,5 +0,0 @@
---
- hosts: localhost
remote_user: root
roles:
- nvm

View File

@@ -1,3 +0,0 @@
---
# vars file for nvm
noahk_password: 'Voorzitter17'