workstation-setup/local.yml

57 lines
1.1 KiB
YAML

---
- hosts: localhost
connection: local
roles:
- role: devoinc.nvm
nodejs_version: "lts"
become: true
become_user: gianm
nvm_commands:
-"nvm install --lts"
- role: gantsign.visual-studio-code
become: true
users:
- username: gianm
tasks:
- name: Set zsh main as shell
become: true
when: ansible_facts['os_family'] == "Debian"
shell: apt update
- name: Basic dev install
become: true
package:
name:
- git
- zsh
- name: Set zsh main as shell
become: true
shell: chsh -s $(which zsh) gianm
- name: check if on my zsh is installed
stat:
path: /home/gianm/.oh-my-zsh
register: zsh_dir
- name: Install oh my zsh
become_user: gianm
when: not zsh_dir.stat.exists
shell: sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
- name: Setup shell env
copy:
src: files/zshrc
dest: /home/gianm/.zshrc
owner: gianm
group: gianm
- name: Setup shell env
copy:
src: files/profile
dest: /home/gianm/.profile
owner: gianm
group: gianm