Generate documentation from Ansible roles in Markdown document.
209
Fully referenced from https://github.com/terraform-docs/terraform-docs .
Generate documentation from Ansible roles in Markdown document.
Stable binaries are also available on the [releases] page. To install, download the binary for your platform from "Assets" and place this into your $PATH:
curl -Lo ./ansibila.tar.gz https://github.com/hateus/ansibila/releases/download/v0.1.0/ansibila-v0.1.0-$(uname)-amd64.tar.gz
tar -xzf ansibila.tar.gz
chmod +x Ansibila.go
mv Ansibila.go /usr/local/ansibila
Ansibila can be run as a container by mounting a directory with roles directory in it and run the following command:
docker run --rm --volume "$(pwd):/ansibila" -u $(id -u) docker.io/michaelact/ansibila:latest markdown table --dirpath /ansibila/path/to/roles --varfile variables.yml --tmplpath templates
If output.file is not enabled for this module, generated output can be redirected
back to a file:
docker run --rm --volume "$(pwd):/ansibila" -u $(id -u) docker.io/michaelact/ansibila:latest markdown table --dirpath /ansibila/path/to/roles --varfile variables.yml --tmplpath templates > doc.md
NOTE: Docker tag latest refers to latest stable released version and edge
refers to HEAD of main at any given point in time.
Generated content can be customized further away with content in configuration.
If the content is empty the default order of sections is used.
Compatible formatters for customized content are markdown.
content is a Go template with following additional variables:
{{ .Metadata }}{{ .Modules }}{{ .Variables }}{{ .Playbook }}{{ .License }}These variables are the generated output of individual sections in the selected
formatter. For example {{ .Variables }} is Markdown Table representation of variables.yml
when formatter is set to markdown table.
MIT License - Copyright (c) 2021 The hateus Author.
Content type
-
Digest
Size
-
Last updated
almost 5 years ago
docker pull michaelact/ansibila