gantsign.ctop

Ansible Role: ctop

Tests Ansible Galaxy License

This role helps you download and install ctop, a user-friendly interface for monitoring container metrics. It allows you to quickly see CPU, RAM, and network usage for your Docker containers directly from the terminal.

Requirements

  • Ansible version 2.9 or higher.

  • A compatible Linux distribution:

    • Debian Family:

      • Debian:
        • Stretch (9)
        • Buster (10)
        • Bullseye (11)
      • Ubuntu:
        • Bionic (18.04)
        • Focal (20.04)
    • RedHat Family:

      • Rocky Linux:
        • 8
      • Fedora:
        • 35
    • SUSE Family:

      • openSUSE:
        • 15.3
    • Note: Other versions may work but haven't been tested.

  • Docker must be installed.

Role Variables

Here are the variables you can change in this role (if you don't set them, defaults will be used):

# ctop version number
ctop_version: '0.7.7'

# SHA256 checksum for the ctop redistributable
ctop_redis_sha256sum: 'b78374734ebe3d14b6edee3d5512c911c250d7fa7f3f964cb00acd3bc5a02a09'

# Folder to save downloaded files for ctop
ctop_download_dir: "{{ x_ansible_download_dir | default(ansible_env.HOME + '/.ansible/tmp/downloads') }}"

Example Playbook

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

Tab Completion for Zsh

Using Ansible

We recommend using the gantsign.antigen role for ctop tab completion (this needs to be set up for each user).

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

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

Using Antigen

If you want to use Antigen on its own, add this to your Antigen configuration:

antigen bundle gantsign/zsh-plugins ctop

More Roles From GantSign

You can find additional roles from GantSign on Ansible Galaxy.

Development & Testing

This project uses Molecule for development and testing. The role is tested with Testinfra and pytest.

To develop or test, make sure you have the following installed:

Installing these can be complicated, so this project provides a tool called Molecule Wrapper. This script helps install Molecule and its dependencies (excluding Linux) and runs Molecule with your specified command.

To test this role using Molecule Wrapper, run the following command from the project directory:

./moleculew test

Note: Some dependencies may require sudo permission to install.

License

MIT License

Author Information

John Freeman

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

Informazioni sul progetto

Ansible role for downloading and installing ctop.

Installa
ansible-galaxy install gantsign.ctop
Licenza
mit
Download
16.6k
Proprietario