Skip to content

A python script to generate Markdown table from Ansible role for documentation.

License

Notifications You must be signed in to change notification settings

RcRonco/role2md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

role2md

A python script to generate Markdown table from Ansible role for documentation.

Prerequisites

  1. python 3
  2. python 3 packages jinja2, yaml.

Installation

The script can be installed with the following steps or with install.sh

  1. 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 
  1. Install the needed python packages
pip3 install -U pyYAML jinja2
  1. Add a execution permissions to the script
sudo chmod +x role2md.py
  1. Run the script!

Running 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"

Example

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.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

About

A python script to generate Markdown table from Ansible role for documentation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published