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.

Build Status PIP Version Coverage Status Gitter IM

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.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file ansible-docgen-1.0.0.tar.gz.

File metadata

  • Download URL: ansible-docgen-1.0.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for ansible-docgen-1.0.0.tar.gz
Algorithm Hash digest
SHA256 bec5934379def5bafe97720f4e60e013793001bb04324fdc0ec238bc7f11befe
MD5 9e7dea4f2551bb7140d2d7231da21fdd
BLAKE2b-256 3c853d1fae16c375507bffa9e12e218b37b977c6042e515780667875c5f130bd

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ansible_docgen-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80a50c15e53c32d0e9a2e3c965ad3cdc0d610b0982bf0737ea4ff7b1b9398638
MD5 58983fbf3201a0e889f91833908ad09d
BLAKE2b-256 730549a8ad6a301f4485e7f1c38ac86668e086462b87402dea3e04a10fa01a6d

See more details on using hashes here.

Provenance

Supported by

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