pandemonium1986.ohmyzsh

Ansible角色:OhMyZsh

Ansible角色 Molecule GitHub发布 Github许可证

为任何用户安装和配置oh-my-zsh。

要求

此角色是自包含的。如果需要,会为Debian、Ubuntu、OpenSUSE、SLES、CentOS安装zsh和git包。

角色变量

来自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

来自vars/[distro|familly]-[os_familly]-[os_version].yml(取决于发行版):

_packages:
  - git
  - sudo
  - zsh

依赖

无。

示例剧本

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

警告:请不要忘记在你的ansible.cfg中将pipeling设置为True,以绕过文件成为非特权用户

许可证

该项目根据MIT许可证授权 - 详细信息见LICENSE文件

作者信息

关于项目

Install and configure oh-my-zsh for any user

安装
ansible-galaxy install pandemonium1986.ohmyzsh
许可证
mit
下载
2.8k
拥有者
SRE CI/CD and DevOps enthusiast