Skip to main content

Auto-generate ansible role documentation

Project description

ansible-document

Automatically document ansible roles.

Concept

Generate documentation automatically by looking up a role's content.

Usage

$ ansible-mkdocs path/to/role
# ex:
$ ansible-mkdocs examples/install_gitlab
name | value | location
------|------|------
gitlab_package_script_url | https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | vars/main.yml
gitlab_interface | {{ ansible_default_ipv4['interface'] }} | defaults/main.yml
gitlab_addr | {{ hostvars[inventory_hostname]['ansible_' + gitlab_interface]['ipv4']['address']  }} | defaults/main.yml
gitlab_install | yes | defaults/main.yml

How does it work?

  • Generate a list with modules and their values
    • Example: copy will be used, register the mode, required, ...
  • Lookup every directory (files, tasks, vars, ...) and fetch information
    • For every directory, generate the associated template
  • Aggregate every generated templates
  • Add metadata
    • Has tests
    • Has molecule
    • Meta from meta/
  • Output markdown

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_mkdocs-0.0.2.tar.gz (4.1 kB view hashes)

Uploaded source

Built Distribution

ansible_mkdocs-0.0.2-py3-none-any.whl (5.7 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page