Ansible-gendoc build documentation of Ansible Roles.
Project description
ansible-gendoc
Inspired by Felix Archambault's ansidoc project
Features
- Command line interface with Typer_
- Generate the documentation for a role located in a directory
- Use a personal template
Quickstart
If you have an existing README.md file in your role, backup it before !
Run From docker
Clone this project and build the image :
git clone
export DOCKER_BUILDKIT=1
docker build . -t ansible-gendoc:0.1.0 -t ansible-gendoc:latest
docker run --user $(id -u):$(id -g) -it ansible_gendoc:latest help
Install python package
Install the latest version Ansible-gendoc with pip or pipx
pip install ansible-gendoc
Usage
ansible-gendoc --help
Usage: ansible-gendoc [OPTIONS] COMMAND [ARGS]...
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ --version -v Show the application's version and exit. │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy │
│ it or customize the installation. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────╮
│ init Copy templates README.j2 from packages in templates/role folder. │
│ render Build the Documentation │
╰──────────────────────────────────────────────────────────────────────────────────╯
Build your first documentation of a role
To build the documentation roles, you can run these commands :
- with package installed with pip
ansible-gendoc render. - with docker images
docker run --user $(id -u):$(id -g) -v <path_role>:/role -it ansible_gendoc:latest render role.
Use your personal template
To use a personal template, you need to init the template in the templates
folder of your role. If ansible-gendoc find an existing file
templates/README.j2, it will use it to render the README.md file.
ansible-gendoc init
ls templates
README.j2
The template use jinja as templating
language.
Modify it, for example replace html or Restructuredtext or another language.
You can remove some variables too.
The documentation of vars coming soon.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ansible-gendoc-0.1.2.tar.gz.
File metadata
- Download URL: ansible-gendoc-0.1.2.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-1019-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e318ecb0a28dddc641a3e9d8d16a6d18add72504e090f5319ad31cd852c131e8
|
|
| MD5 |
f3b49f9cd44f0fedcb43819f466aadbf
|
|
| BLAKE2b-256 |
8e9f9b8e6bc6d80f53089374704f4897d5f4716140cca6c45226c18b01b67820
|
File details
Details for the file ansible_gendoc-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ansible_gendoc-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.2.0 CPython/3.10.6 Linux/5.15.0-1019-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bec0f80382869b27981ee95acd9bc520fd09d83471320c6f1741add0473464ee
|
|
| MD5 |
728eed9ed0fd53d46a41bcd3e169bd9e
|
|
| BLAKE2b-256 |
eaed322729b5fbf45228350e16c72b50c60f1f9c87a7a6ce304682e0cda154f1
|