workstation-setup/local.yml

56 lines
1.1 KiB
YAML
Raw Normal View History

2021-12-24 11:17:59 +01:00
---
- hosts: localhost
connection: local
2021-12-24 12:56:04 +01:00
roles:
2021-12-24 14:29:45 +01:00
- role: devoinc.nvm
nodejs_version: "lts"
2021-12-24 14:40:56 +01:00
become_user: gianm
2021-12-24 14:29:45 +01:00
nvm_commands:
-"nvm install --lts"
2021-12-24 12:56:04 +01:00
- role: gantsign.visual-studio-code
2021-12-24 14:29:45 +01:00
become: true
2021-12-24 12:56:04 +01:00
users:
- username: gianm
2021-12-24 11:17:59 +01:00
tasks:
2021-12-25 17:27:14 +01:00
- name: Set zsh main as shell
become: true
when: ansible_facts['os_family'] == "Debian"
shell: apt update
2021-12-24 11:17:59 +01:00
- name: Basic dev install
2021-12-24 14:29:45 +01:00
become: true
2021-12-24 11:17:59 +01:00
package:
name:
- git
- zsh
2021-12-24 12:03:11 +01:00
- name: Set zsh main as shell
2021-12-24 12:05:28 +01:00
become: true
2021-12-24 12:23:02 +01:00
shell: chsh -s $(which zsh) gianm
2021-12-24 12:03:11 +01:00
2021-12-24 12:56:04 +01:00
- name: check if on my zsh is installed
stat:
path: /home/gianm/.oh-my-zsh
register: zsh_dir
2021-12-24 12:03:11 +01:00
- name: Install oh my zsh
become_user: gianm
2021-12-24 12:56:04 +01:00
when: not zsh_dir.stat.exists
2021-12-24 12:03:11 +01:00
shell: sh -c "$(wget https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh -O -)"
2021-12-25 17:27:14 +01:00
- 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