xanmanning.asciinema

Ansible Role: asciinema

This Ansible role installs the asciinema terminal recorder inside a Python3 Virtual Environment (VirtualEnv).

Build Status

Requirements

This role works with Ansible version 2.7.0 and above on the following Linux distributions:

  • Amazon Linux 2
  • CentOS 8
  • CentOS 7
  • Debian 10
  • Fedora 29
  • Fedora 30
  • Fedora 31
  • Ubuntu 18.04 LTS

Disclaimer

If you encounter any issues, please create a GitHub issue. I maintain this role in my free time, so I can't guarantee a quick fix.

Role Variables

Variable Description Default Value
asciinema_version Specify a version of asciinema, e.g., 2.0.2. Use false for the latest. false
asciinema_install_dir Directory where asciinema virtual environments will be installed. $HOME/.virtualenvs
asciinema_venv_name Name for the asciinema VirtualEnv. asciinema
asciinema_venv_suffix Add a custom suffix to the virtual environment. asciinema_version
asciinema_venv_site_packages Allow the virtual environment to use global packages. false
asciinema_install_venv_helper Install a helper to run virtual environment executables from a "bin" directory. true
asciinema_bin_dir Directory to install virtual environment helpers. $HOME/bin
asciinema_install_os_dependencies Allow the installation of OS dependencies. false
asciinema_python3_path Path to a specific Python version for the virtual environment. NULL

Dependencies

This role does not depend on any other roles.

Example Playbook

Here’s an example playbook to install asciinema for a single user:

- hosts: asciinema_hosts
  roles:
     - { role: xanmanning.asciinema, asciinema_version: 2.0.2 }

Here’s an example playbook to install the latest version of asciinema globally:

---
- hosts: asciinema_hosts
  become: true
  vars:
    asciinema_install_os_dependencies: true
    asciinema_install_dir: /opt/asciinema/bin
    asciinema_bin_dir: /usr/bin
    asciinema_venv_name: current
  roles:
    - role: xanmanning.asciinema

Activating the asciinema VirtualEnv

To use asciinema, you need to activate the Python3 virtual environment. You can do this with the following command:

source {{ asciinema_install_dir }}/{{ asciinema_venv_name }}/bin/activate

For the global installation example above, this command would look like:

source /opt/asciinema/bin/current/bin/activate

License

BSD 3-clause

Author Information

Created by Xan Manning

Informazioni sul progetto

Ansible Role to install asciinema

Installa
ansible-galaxy install xanmanning.asciinema
Licenza
bsd-3-clause
Download
86
Proprietario
Deep in the lab...