ansible-docgen generates documentation from annotated Ansible Playbooks and Roles.
pip install ansible-docgen
or
easy_install ansible-docgen
---
# 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
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
ansible-docgen is released under the MIT License.
David Whiteside ([email protected])