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 Python 3

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