/ansible-role-zsh

oh-my-zsh with powerlevel9k theme, fzf, autosuggestions, syntax-highlighting

Build Status

Tested on Debian 6, Ubuntu 14.04, Ubuntu 16.04, macOS 10.12, CentOS 7.

Please, check settings in defaults/main.yml before provision! You can test role in vagrant:

vagrant up

Includes:

Features

  • customize powerlevel9k theme prompt segments and colors
  • default colors tested with solarized dark and default grey terminal in putty
  • add custom prompt elements from yml
  • custom zsh config with ~/.zshrc.local or /etc/zshrc.local

1.5 mins demo

1.5 mins demo

Color schemes

colors demo

Install

Download role:

ansible-galaxy install viasite-ansible.zsh

Write playbook:

- hosts: all
  vars:
    zsh_autosuggestions_bind_key: "^U"
  roles:
    - viasite-ansible.zsh

Provision playbook:

ansible-playbook -i "localhost," -c local zsh.yml

It will install zsh environment for ansible remote user. If you want to setup zsh for other user, you should define variable zsh_user:

Via playbook:

- hosts: all
  roles:
    - { role: viasite-ansible.zsh, zsh_user: otheruser }

Or via command:

ansible-playbook -i hosts zsh.yml --extra-vars="zsh_user=otheruser"

Configure

You should not edit ~/.zshrc! Add your custom config to ~/.zshrc.local (per user) or /etc/zshrc.local (global).