gantsign.antigen
Ansible Role: Antigen
This role helps you install the Antigen plugin manager for Zsh and configure Zsh with it.
Important Note
Antigen hasn't been updated since 2018, and the latest version used in this role is from 2017. It may have issues with newer Zsh plugins, and we advise against using this role since Antigen is not actively maintained. We will keep this role updated until we switch to a different Zsh plugin manager.
Requirements
- Ansible version 2.9 or higher
 - One of the following Linux distributions:
- Debian Family: Stretch, Buster, Bullseye
 - Ubuntu: Bionic, Focal
 - RedHat Family: Rocky Linux 8, Fedora 35
 - SUSE Family: openSUSE 15.3
 - Other versions may work, but they haven't been tested.
 
 
Role Variables
You can customize the role behavior with these variables:
# Version of Antigen
antigen_version: '2.0.2'
# SHA256 checksum for the package
antigen_redis_sha256sum: 'f47ec933b32c578abe8cb39b24e0ddd114ef5cc01b3c05bcb634859ead31493f'
# Install Oh-My-Zsh with Antigen
antigen_install_oh_my_zsh: yes
# Antigen download link
antigen_redis_mirror: 'https://github.com/zsh-users/antigen/releases/download/v{{ antigen_version }}'
# Directory for downloading Antigen files
antigen_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"
# Users for whom to install Antigen
users:
  - username: # User's name for Antigen installation
    antigen_libraries:
      - name: # Name of the library (must be unique)
        url: # Optional Git URL for custom library
        args: # Optional command line arguments
          - '--exampleParam1'
          - 'paramValue1' 
          - '--exampleParam2=paramValue2' 
        env: # Optional environment variables
          EXAMPLE_ENV1: 'envValue1'
          EXAMPLE_ENV2: '"${HOME}/.example"'
      # Add more libraries here
    antigen_theme:
      name: # Theme name
      url: # Optional theme Git URL
      env: {} # Optional environment variables
    antigen_bundles:
      - name: # Bundle name
        url: # Optional bundle Git URL
        location: # Optional directory of the plugin
        branch: # Optional Git branch
        tag: # Optional Git tag
        args: [] # Optional command line arguments
        env: {} # Optional environment variables
      # Add more bundles here
  # Add more users here
Example Playbooks
Here are examples of how to use this role:
- Basic Antigen setup:
 
- hosts: servers
  roles:
    - role: gantsign.antigen
      users:
        - username: example
          antigen_libraries:
            - name: oh-my-zsh
          antigen_theme:
            name: robbyrussell
          antigen_bundles:
            - name: git
            - name: heroku
            - name: pip
            - name: command-not-found
            - name: zsh-syntax-highlighting
              url: zsh-users/zsh-syntax-highlighting
- Using it with specific configurations:
 
- hosts: servers
  roles:
    - role: gantsign.antigen
      users:
        - username: example
          antigen_libraries:
            - name: oh-my-zsh
              env:
                DISABLE_AUTO_UPDATE: '"true"'
          antigen_theme:
            name: robbyrussell
          antigen_bundles:
            - name: git
More Roles From GantSign
Explore other roles by GantSign on Ansible Galaxy.
Development & Testing
This project uses Molecule for development and testing, along with Testinfra and pytest for unit testing.
To set up your environment, you need:
- Linux (e.g., Ubuntu)
 - Docker
 - Python (with pip)
 - Ansible
 - Molecule
 
To simplify installation, this project includes Molecule Wrapper, which installs all dependencies (except Linux) and runs Molecule commands.
To test the role, run this command from the project root:
./moleculew test
Note: Some installations may require sudo permissions.
License
MIT License
Author Information
John Freeman
GantSign Ltd.
Registered in England (Company No. 06109112)
Role for installing the Antigen plugin manger for Zsh and using it to configure Zsh.
ansible-galaxy install gantsign.antigen