A python script to generate Markdown table from Ansible role for documentation.
- python 3
- python 3 packages jinja2, yaml.
The script can be installed with the following steps or with install.sh
- Install python 3
# Ubuntu
sudo apt-get install python3 python3-pip
# rhel/centos from epel repository
sudo yum install python34 python34-pip
# fedora 23+
sudo dnf install python3 python3-pip
- Install the needed python packages
pip3 install -U pyYAML jinja2
- Add a execution permissions to the script
sudo chmod +x role2md.py
- Run the script!
To run the script all you need is to run the command in this format:
./role2md.py -src=/path/to/role -dst=/path/to/save/README.md -desc="Description of the role"
Thanks to the nginx role from bennojoy for testing
# Running the script
./role2md.py -src=test/nginx -dst=test/README.md -desc="install nginx ansible playbook"
Watch the READMEfile generated.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D