nvm installer

This commit is contained in:
Gianmarco Pettinato 2021-12-25 18:14:16 +01:00
parent e2a7f5e610
commit a5a55d46c5

View File

@ -2,12 +2,6 @@
- hosts: localhost - hosts: localhost
connection: local connection: local
roles: roles:
- role: devoinc.nvm
nodejs_version: "lts"
become_user: gianm
nvm_commands:
-"nvm install --lts"
- role: gantsign.visual-studio-code - role: gantsign.visual-studio-code
become: true become: true
users: users:
@ -23,7 +17,6 @@
become: true become: true
package: package:
name: name:
- git
- zsh - zsh
- name: Set zsh main as shell - name: Set zsh main as shell
@ -40,21 +33,28 @@
msg: "skipping install oh my zsh" msg: "skipping install oh my zsh"
when: zsh_dir.stat.exists when: zsh_dir.stat.exists
- name: Install oh my zsh - name: install oh my zsh
become_user: gianm become_user: gianm
when: not zsh_dir.stat.exists when: not zsh_dir.stat.exists
shell: sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)" shell: sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
- name: Setup shell env - name: Setup .zshrc
copy: copy:
src: files/zshrc src: files/zshrc
dest: /home/gianm/.zshrc dest: /home/gianm/.zshrc
owner: gianm owner: gianm
group: gianm group: gianm
- name: Setup shell env - name: Setups .profile
copy: copy:
src: files/profile src: files/profile
dest: /home/gianm/.profile dest: /home/gianm/.profile
owner: gianm owner: gianm
group: gianm group: gianm
- name: install nvm
become_user: gianm
shell: >
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | zsh
args:
creates: "{{ ansible_env.HOME }}/.nvm/nvm.sh"