xanmanning.diagrams
Ansible Role: Diagrams
This Ansible role helps install Diagrams in a Python3 Virtual Environment.
Requirements
This role has been tested 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
The server you want to set this up on needs these packages:
- Graphviz
- python3
- python3 venv
Disclaimer
If you encounter any issues, please create a GitHub issue. I maintain this role in my free time, so I may not be able to fix problems quickly.
Role Variables
Variable | Description | Default Value |
---|---|---|
diagrams_version |
Choose a specific version of diagrams, for example, 0.10.0 . Use false for the latest version. |
false |
diagrams_install_dir |
Directory where diagrams' virtual environments will be installed. | $HOME/.virtualenvs |
diagrams_venv_name |
Name for the diagrams Virtual Environment. | diagrams |
diagrams_venv_suffix |
Custom suffix for the virtual environment. | diagrams_version |
diagrams_venv_site_packages |
Allow the virtual environment to use packages from the global site-packages. | false |
diagrams_install_os_dependencies |
Let this role install OS dependencies if needed. | false |
diagrams_python3_path |
Path to a specific Python version to use in the virtual environment. | NULL |
Dependencies
No dependencies on other roles.
Example Playbooks
Single User Installation
Here is a simple playbook that installs Diagrams for a single user:
- hosts: diagrams_hosts
roles:
- { role: xanmanning.diagrams, diagrams_version: 0.10.0 }
Global Installation of the Latest Version
This playbook installs the latest version of Diagrams globally:
---
- hosts: diagrams_hosts
become: true
vars:
diagrams_install_os_dependencies: true
diagrams_install_dir: /opt/diagrams/bin
diagrams_venv_name: current
roles:
- role: xanmanning.diagrams
Activating the Diagrams Virtual Environment
To use diagrams
, you need to activate the Python3 virtual environment with this command:
source {{ diagrams_install_dir }}/{{ diagrams_venv_name }}/bin/activate
For the global installation example, this command will be:
source /opt/diagrams/bin/current/bin/activate
License
Author Information
Informazioni sul progetto
Ansible Role to install Diagrams
Installa
ansible-galaxy install xanmanning.diagrams
Licenza
bsd-3-clause
Download
164
Proprietario
Deep in the lab...