gantsign.bat

Ansible Role: bat

Tests Ansible Galaxy License

This role is for downloading and installing bat, which is a better alternative to cat.

Requirements

  • You need Ansible Core version 2.12 or higher.

  • It works on Linux distributions like:

    • Debian Family

      • Debian:

        • Buster (10)
        • Bullseye (11)
        • Bookworm (12)
      • Ubuntu:

        • Bionic (18.04)
        • Focal (20.04)
        • Jammy (22.04)
      • Note: Other versions may work, but we haven't tested them.

Role Variables

Here are some variables that you can change (default values are shown below):

# Version of bat to install
bat_version: '0.23.0'

# The SHA256 hash of the bat package
bat_redis_sha256sum: '56b3d05e11c6d473643766c612d10c2d3de56ff2fcd14b3d82d86f5843307ced'

# Directory for storing downloaded files for bat
bat_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"

Example Playbook

- hosts: servers
  roles:
    - role: gantsign.bat

Tab Completion for Zsh

Using Ansible

To enable Zsh support for bat, it's best to use the gantsign.antigen role (you need to set this up for each user).

- hosts: servers
  roles:
    - role: gantsign.hub

    - role: gantsign.antigen
      users:
        - username: example
          antigen_bundles:
            - name: bat
              url: gantsign/zsh-plugins
              location: bat

Using Antigen Directly

If you want to use Antigen directly, add the following line to your Antigen configuration:

antigen bundle gantsign/zsh-plugins bat

More Roles From GantSign

You can explore more roles from GantSign on Ansible Galaxy.

Development & Testing

This project uses several tools:

  • Molecule for running test scenarios
  • Testinfra for testing changes on remote systems
  • pytest as the testing framework
  • Tox for managing Python environments for linting and testing
  • pip-tools for handling dependencies

A Visual Studio Code Dev Container is provided for developing and testing this role.

License

MIT

Author Information

John Freeman

GantSign Ltd. Registered Company No. 06109112 (in England)

Informazioni sul progetto

Role for installing bat the advanced alternative to cat.

Installa
ansible-galaxy install gantsign.bat
Licenza
mit
Download
25.3k
Proprietario