pandemonium1986.ohmyzsh

Ansible Role: OhMyZsh

Ansible Role Molecule GitHub Release GitHub License

This role installs and sets up oh-my-zsh for any user.

Requirements

This role works by itself. It will install the zsh and git packages if they are not already present on debian, ubuntu, opensuse, sles, and centos systems.

Role Variables

From defaults/main.yml:

ohmyzsh_users:
  - user_name: pandemonium
    user_group: pandemonium
    user_home: /home/pandemonium/

ohmyzsh_config:
  - { regexp: '^ZSH_THEME="robbyrussell"$', line: 'ZSH_THEME="agnoster"' }
  - { regexp: '^# ENABLE_CORRECTION="true"$', line: 'ENABLE_CORRECTION="true"' }
  - { regexp: '^plugins=\(.*\)', line: "plugins=({{ ohmyzsh_plugins }})" }

ohmyzsh_plugins: >-
  ansible
  colored-man-pages
  composer
  debian
  docker
  docker-compose
  extract
  git
  git-flow
  history
  kubectl
  minikube
  ssh-agent
  vagrant
  zsh-autosuggestions
  zsh-syntax-highlighting

From vars/[distro|family]-[os_family]-[os_version].yml (depends on the distribution):

_packages:
  - git
  - sudo
  - zsh

Dependencies

None.

Example Playbook

- name: OhMyZsh play
  hosts: pandama
  become: true
  become_method: sudo
  become_user: root
  tasks:
    - import_role:
        name: pandemonium1986.ohmyzsh

Warning: Make sure to set pipelining: true in your ansible.cfg to avoid issues when switching to an unprivileged user. You can read more about it here.

License

This project is licensed under the MIT License. Details can be found in the LICENSE file.

Author Information

Informazioni sul progetto

Install and configure oh-my-zsh for any user

Installa
ansible-galaxy install pandemonium1986.ohmyzsh
Licenza
mit
Download
2.8k
Proprietario
SRE CI/CD and DevOps enthusiast