Ansible-Gendoc
Inspired by Felix Archambault's ansidoc project.
An example generated with ansible-gendoc.
Features
- Generate the documentation for a role located in a directory
- Can use a personal template
README.j2present in foldertemplates
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.
Documentation of vars template
The documentation of vars coming soon.
Metadata
Release files for ansible-gendoc 0.1.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ansible-gendoc-0.1.11.tar.gz | 14.0 kB | Without provenance | Details for ansible-gendoc-0.1.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ansible_gendoc-0.1.11-py3-none-any.whl | Python 3 | none | any | Details for ansible_gendoc-0.1.11-py3-none-any.whl |
Total release size: 33.8 kB
Release files / ansible-gendoc-0.1.11.tar.gz
| Download URL | ansible-gendoc-0.1.11.tar.gz |
|---|---|
| Size | 14.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b598f8d13ce684f50f00d08be3c26c99ecb3bfc3d5147b6c49d2903e44b46fe9
|
|
BLAKE2b-256 checksum How to use checksums |
937fba9106965a6951540ba61bbaccf5c85ec34e0eb444a19f832e7261fecd33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.10.7 Linux/5.15.0-1020-azure
|
Release files / ansible_gendoc-0.1.11-py3-none-any.whl
| Download URL | ansible_gendoc-0.1.11-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b652b6503e875540578135cbd8b6d2e1ead3fc29ac86330c407f2242e2f204eb
|
|
BLAKE2b-256 checksum How to use checksums |
e3dc95a90db719be6ab8e657605e43d83c4180d387b18c71d53f932c91a95b7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.10.7 Linux/5.15.0-1020-azure
|
Security for ansible-gendoc 0.1.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.