Skip to main content

Generate Documentation from Annotated Ansible Playbooks and Roles

Project description

ansible-docgen

Description

ansible-docgen generates documentation from annotated Ansible Playbooks and Roles.

Tests PIP Version

Installation

pip install ansible-docgen

or

easy_install ansible-docgen

Usage

Annotate Your Playbooks and Roles

---
# test_playbook.yml
# Author: John Doe
# Description: Install a Webserver
- name: Install Apache
  yum: name=httpd state=installed
---
# roles/appserver/tasks/main.yml
# Author: John Doe
# Description: Appserver role
- name: Copy Installer
  copy: src=installer dest=/tmp/
  tags:
    - copy-installer
- name:  Run Installer
  shell: /tmp/installer.sh
  tags:
    - run-installer

Generate Documentation from Annotation

Use -p to specify your project directory. Click the links to preview the Markup generated by ansible-docgen. Warning: This will overwrite existing README files.

ansible-docgen -p your_ansible_project

Generated Markup File your_ansible_project/rolestest/README.md

Generated Markup File your_ansible_project/roles/README.md

Generated Markup File your_ansible_project/README.md

If your current directory is your project directory just run ansible-docgen without any arguments. Warning: This will overwrite existing README files.

cd your_ansible_project && ansible-docgen

Generated Markup File otherroles/README.md

Generated Markup File roles/README.md

Generated Markup File README.md

Help output
usage: ansible-docgen [-h] [-p PROJECT] [-f FILENAME] [-s STYLE] [-n] [-v]

options:
  -h, --help            show this help message and exit
  -p PROJECT, --project PROJECT
                        Path to Ansible project. Default is the current directory.
  -f FILENAME, --filename FILENAME
                        filename used for the output documentation file. Default is README
  -s STYLE, --style STYLE
                        Choose the format for the documentation. Default is markdown. Example: --style=[markdown]
  -n, --no-tags         This option disables show tags in the documentation
  -v, --version         Print version

License

ansible-docgen is released under the MIT License.

Author

David Whiteside (david@davidwhiteside.com)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ansible_docgen-1.0.1.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ansible_docgen-1.0.1-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file ansible_docgen-1.0.1.tar.gz.

File metadata

  • Download URL: ansible_docgen-1.0.1.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ansible_docgen-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a619c1fc53f0de595ee09d980826284f2ddc75b6d739d814e0f4d3162c41f71b
MD5 7102cd60fc849d2787ed118b2eb55596
BLAKE2b-256 495f26654a413178a723441a0cefa42e02d3442df92dcb90875110b44ee11482

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_docgen-1.0.1.tar.gz:

Publisher: deploy-prod.yml on outbit/ansible-docgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ansible_docgen-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ansible_docgen-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ansible_docgen-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 50c46215e7499feff60cb51fb3566ee3365e970c6c9349b8598a9e5d30aa22ad
MD5 4c44b758fde742b5fc7799e6bfa7e9f3
BLAKE2b-256 8e1734b82c9df487eb1e6fada5b145dd793b1942d6fd5facc0b8f3c3abb74cff

See more details on using hashes here.

Provenance

The following attestation bundles were made for ansible_docgen-1.0.1-py3-none-any.whl:

Publisher: deploy-prod.yml on outbit/ansible-docgen

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page