2021-12-24 11:17:59 +01:00
|
|
|
---
|
|
|
|
- hosts: localhost
|
|
|
|
connection: local
|
2021-12-24 12:56:04 +01:00
|
|
|
roles:
|
|
|
|
- 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-27 14:33:54 +01:00
|
|
|
- name: add to repository nodejs
|
|
|
|
become: true
|
|
|
|
shell: curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
|
|
|
|
|
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:
|
|
|
|
- zsh
|
2021-12-27 14:33:54 +01:00
|
|
|
- nodejs
|
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:
|
2021-12-25 17:42:41 +01:00
|
|
|
path: "/home/gianm/.oh-my-zsh"
|
2021-12-24 12:56:04 +01:00
|
|
|
register: zsh_dir
|
|
|
|
|
2021-12-25 17:42:41 +01:00
|
|
|
- name: Install oh my zsh
|
|
|
|
debug:
|
|
|
|
msg: "skipping install oh my zsh"
|
|
|
|
when: zsh_dir.stat.exists
|
|
|
|
|
2021-12-27 14:00:58 +01:00
|
|
|
- name: Install oh my zsh
|
2021-12-27 14:11:20 +01:00
|
|
|
become_user: gianm
|
2021-12-27 14:00:58 +01:00
|
|
|
git:
|
|
|
|
repo: https://github.com/ohmyzsh/ohmyzsh.git
|
|
|
|
dest: ~/.oh-my-zsh
|
|
|
|
depth: 1
|
2021-12-25 18:14:16 +01:00
|
|
|
|
|
|
|
- name: Setup .zshrc
|
2021-12-27 14:11:20 +01:00
|
|
|
become_user: gianm
|
2021-12-25 17:27:14 +01:00
|
|
|
copy:
|
|
|
|
src: files/zshrc
|
2021-12-27 14:11:20 +01:00
|
|
|
dest: ~/.zshrc
|
2021-12-27 14:00:58 +01:00
|
|
|
mode: 0644
|
2021-12-25 17:27:14 +01:00
|
|
|
|
2021-12-27 14:33:54 +01:00
|
|
|
- name: Setup .profile
|
2021-12-27 14:11:20 +01:00
|
|
|
become_user: gianm
|
2021-12-25 17:27:14 +01:00
|
|
|
copy:
|
|
|
|
src: files/profile
|
2021-12-27 14:11:20 +01:00
|
|
|
dest: ~/.profile
|
2021-12-27 14:35:32 +01:00
|
|
|
mode: 0644
|
|
|
|
|
|
|
|
- name: Setup .profile
|
|
|
|
become: true
|
|
|
|
shell: reboot
|