ptavares.ansible_role_oh_my_zsh
Ansible Role for Oh My Zsh
This is an Ansible role designed to install and set up zsh and oh-my-zsh.
Requirements
- This role works with Ansible version 2.5 or higher.
Role Variables
Here are the variables you can customize, along with their default values:
Customize Theme
# Default theme to use (included with oh-my-zsh)
# Find all themes here: https://github.com/robbyrussell/oh-my-zsh/tree/master/themes
oh_my_zsh_default_theme: robbyrussell
# To use a custom theme not located in $HOME/.oh-my-zsh/themes or $HOME/.oh-my-zsh/custom/themes:
# 1. Define oh_my_zsh_custom_theme_info
# - This theme will be downloaded to $HOME/.oh-my-zsh/custom/custom-themes/
# oh_my_zsh_custom_theme_info: { url: "oh_my_zsh_custom_theme_git_url", dir_dest_name: "oh_my_zsh_custom_git_dir_name" }
# example:
oh_my_zsh_custom_theme_info: { url: "https://github.com/ptavares/zsh-themes.git", dir_dest_name: zsh-themes }
# 2. Select the custom zsh theme name to load
# - A symlink will be created from $HOME/.oh-my-zsh/custom/custom-themes/oh_my_zsh_custom_theme_git_dir_name/oh_my_zsh_custom_theme_name to $HOME/.oh-my-zsh/custom/themes/
# oh_my_zsh_custom_theme: oh_my_zsh_custom_theme_name
# example:
oh_my_zsh_custom_theme: ptavares
# 3. Add extra configurations for the theme
# oh_my_zsh_custom_theme_config:
# - MY_CUSTOM_THEME_VAR1=value
# - MY_CUSTOM_THEME_VAR2=value2
Customize Plugins
# Default plugins to use (included with oh-my-zsh)
# Find all plugins here: https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins
oh_my_zsh_default_plugins:
- git
# For custom plugins not present in $HOME/.oh-my-zsh/plugins or $HOME/.oh-my-zsh/custom/plugins:
# 1. Define oh_my_zsh_custom_plugins_info
# - Plugins will be downloaded to $HOME/.oh-my-zsh/custom/custom-plugins/
# - A symlink will be created from $HOME/.oh-my-zsh/custom/custom-plugins/oh_my_zsh_custom_plugin_dir_name to $HOME/.oh-my-zsh/custom/plugins/
# oh_my_zsh_custom_plugins_info: { url: "oh_my_zsh_custom_plugin_git_url", dir_dest_name: "oh_my_zsh_custom_plugin_git_dir_name" }
# example:
oh_my_zsh_custom_plugins_info:
- { url: "https://github.com/junegunn/fzf.git", dir_dest_name : fzf }
- { url: "https://github.com/Treri/fzf-zsh.git", dir_dest_name: fzf-zsh }
- { url: "https://github.com/zsh-users/zsh-autosuggestions.git", dir_dest_name: zsh-autosuggestions }
- { url: "https://github.com/zdharma/fast-syntax-highlighting.git", dir_dest_name: fast-syntax-highlighting }
- { url: "https://github.com/chrissicool/zsh-bash.git", dir_dest_name: zsh-bash }
# 2. List your custom plugins to load when starting zsh
# oh_my_zsh_custom_plugins:
# - oh_my_zsh_custom_plugin_1
# - oh_my_zsh_custom_plugin_2
# example:
oh_my_zsh_custom_plugins:
- fzf-zsh
- zsh-autosuggestions
- fast-syntax-highlighting
- zsh-bash
# 3. Extra commands needed for some plugins
# oh_my_zsh_custom_plugins_command :
# - "oh_my_zsh_custom_plugins_command_1"
# - "oh_my_zsh_custom_plugins_command_2"
# example:
oh_my_zsh_custom_plugins_command :
- "$HOME/.oh-my-zsh/custom/plugins/fzf/install --all"
- "fast-theme safari"
Customize .zhrc Entries
# Add entries you want in your .zshrc file, such as aliases
# oh_my_zsh_custom_zsh_entries:
# - "oh_my_zsh_custom_zsh_entries_1"
# - "oh_my_zsh_custom_zsh_entries_2"
# example:
oh_my_zsh_custom_zsh_entries:
- "# Alias for listing only directories"
- "alias lsd='ls -l | grep \"^d\"'"
Dependencies
- There are no dependencies.
Example Playbook
- hosts: all
roles:
- role: ptavares.ansible_role_oh_my_zsh
Inside vars/main.yml
:
- Copy the content from defaults/main.yml into your playbook's vars file.
- Customize as needed (by filling in the role's variables).
License
This role is licensed under the MIT License.
Informazioni sul progetto
Ansible role for installating and configuring zsh and oh-my-zsh
Installa
ansible-galaxy install ptavares.ansible_role_oh_my_zsh
Licenza
mit
Download
176
Proprietario