Skip to content

About

A role for Ansible, that installs zsh and Oh My Zsh for better Terminal workflow.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

59 Commits

Folders and files

Repository files navigation

ansible-role-zsh

A role for Ansible, that installs zsh and Oh My Zsh for better Terminal workflow.

Requirements

This role does not need any additional required packages.

Quick start

  1. First clone this repository and add into your project directory.
  2. Include the role in your Ansible playbook.

Example playbook

Example use of a role, that will install the latest version of zsh and Oh My Zsh.

- hosts: all
  roles:
    - role: krudi.zsh
      zsh:
        write_file: true
        change_shell: true
      omz:
        install: true
        user: bob
        plugins:
          - git
          - zsh-autosuggestions

Role variables

Variable Default Description
zsh.write_file true Whether to write the user's ~/.zshrc from the role template.
zsh.change_shell true Whether to change the user's default shell to zsh.
omz.install true Whether Oh My Zsh should be installed.
omz.user bob The user Oh My Zsh (and the .zshrc) is installed for.
omz.plugins ["git", "zsh-autosuggestions"] The Oh My Zsh plugins enabled in the generated .zshrc.

See defaults/main.yml for the current defaults. Note omz.user defaults to bob, which you will typically want to override for your own user.

Testing

This role includes a Molecule test scenario under molecule/default. Run it with uvx --with-requirements requirements-ci.txt --from molecule molecule test (requires Docker and provisions real containers, so run it deliberately rather than as part of routine checks).

Lint the role with uvx --with-requirements requirements-ci.txt ansible-lint; uvx lefthook install runs it on staged files before each commit.

Issue

Have you found a bug in this project or have a suggestion for a new feature? Create a new ticket for the bug or feature, which can be found on the GitHub page.

About

A role for Ansible, that installs zsh and Oh My Zsh for better Terminal workflow.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages