--- - hosts: localhost connection: local roles: - role: gantsign.visual-studio-code become: true users: - username: gianm tasks: - name: add to repository nodejs become: true shell: curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - - 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: - zsh - nodejs - 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 debug: msg: "skipping install oh my zsh" when: zsh_dir.stat.exists - name: Install oh my zsh become_user: gianm git: repo: https://github.com/ohmyzsh/ohmyzsh.git dest: ~/.oh-my-zsh depth: 1 - name: Setup .zshrc become_user: gianm copy: src: files/zshrc dest: ~/.zshrc mode: 0644 - name: Setup .profile become_user: gianm copy: src: files/profile dest: ~/.profile mode: 0644