caduri.ohmyzsh

Ansible role: ohmyzsh

MIT licensed Galaxy Role

Cross-platform ansible role for installing and configuring zsh with oh-my-zsh

Default oh-my-zsh theme: powerlevel9k

In combination with ansible-macos_terminal role getting the following results:

alt text

Requirements

NOTE: Role requires Fact Gathering by ansible!

One of the following OS (or deriviatives):

For MacOS: if Homebrew is not installed on the managed host, install the following role via galaxy:

ansible-galaxy install drew-kun.homebrew

And include it in the playbook:

roles:
    - drew-kun.homebrew

Role Variables

OS-Agnostic:

Variable Description Default
ohmyzsh_install_dir Directory oh-my-zsh to be installed in /usr/local/share/ohmyzsh
ohmyzsh_custom_aliases File containing custom shell config $HOME/.zsh/aliases.local
ohmyzsh_powerlevel9k Whether to install powerlevel9k theme or not yes
ohmyzsh_users[] List of users to install zsh/oh-my-zsh for see defaults/main.yml
ohmyzsh_default_theme Default theme to be configured for users which do not have theme specified robbyrussell
ohmyzsh_default_plugins[] The list of plugins for oh-my-zhs to be installed see defaults/main.yml

OS-Specific:

Variable Description Default
ohmyzsh_root_dir Root directory
  • Darwin: /var/root
  • Debian: /root
ohmyzsh_home_dir User's home directory
  • Darwin: /Users/
  • Debian: /home/
ohmyzsh_zprofile_dir Zsh profile directory
  • Darwin: /etc/
  • Debian: /etc/zsh/

Dependencies

None

Example Playbook

- hosts: dev_clients_macos
  gather_facts: yes
  roles:
  - drew-kun.homebrew
  - <CHANGE_IT>.ohmyzsh

License

MIT

Author Information

#TODO change it Andrew Shagayev | e-mail

About

This role installs zsh and oh-my-zsh

Install
ansible-galaxy install caduri.ohmyzsh
GitHub repository
License
mit
Downloads
121
Owner