rcronco / role2md Goto Github PK
View Code? Open in Web Editor NEWA python script to generate Markdown table from Ansible role for documentation.
License: BSD 3-Clause "New" or "Revised" License
A python script to generate Markdown table from Ansible role for documentation.
License: BSD 3-Clause "New" or "Revised" License
role2md.py
script is mentioned in the readme as the main script to run but it does not exists the repository.
The current jinja2 package does not support functions pipelined inside of the role usage.
Example:
{{ some_text | to_nicejson }}
Need to find another package for parsing Jinja2 or parse it line by line like the tasks parser
Fix filtering builtin variables like Ansible_* or hostvars in the default scan.
Add some useful flags:
Scan multiple roles and generate multiple README's
When running setup.py or pip3 install -U yaml
on Centos 7 the installation fails as the package does not exists
[root@localhost role2md]# pip3 install -U yaml
Collecting yaml
Could not find a version that satisfies the requirement yaml (from versions: )
No matching distribution found for yaml
[root@localhost role2md]# python3 setup.py install
running install
running bdist_egg
running egg_info
creating role2rdme.egg-info
writing role2rdme.egg-info/PKG-INFO
writing requirements to role2rdme.egg-info/requires.txt
writing dependency_links to role2rdme.egg-info/dependency_links.txt
writing top-level names to role2rdme.egg-info/top_level.txt
writing manifest file 'role2rdme.egg-info/SOURCES.txt'
reading manifest file 'role2rdme.egg-info/SOURCES.txt'
writing manifest file 'role2rdme.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/role2md
copying role2md/__init__.py -> build/lib/role2md
copying role2md/table2md.py -> build/lib/role2md
copying role2md/types.py -> build/lib/role2md
creating build/bdist.linux-x86_64
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/role2md
copying build/lib/role2md/__init__.py -> build/bdist.linux-x86_64/egg/role2md
copying build/lib/role2md/table2md.py -> build/bdist.linux-x86_64/egg/role2md
copying build/lib/role2md/types.py -> build/bdist.linux-x86_64/egg/role2md
byte-compiling build/bdist.linux-x86_64/egg/role2md/__init__.py to __init__.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/role2md/table2md.py to table2md.cpython-34.pyc
byte-compiling build/bdist.linux-x86_64/egg/role2md/types.py to types.cpython-34.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying role2rdme.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying role2rdme.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying role2rdme.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying role2rdme.egg-info/not-zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
copying role2rdme.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying role2rdme.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
creating dist
creating 'dist/role2rdme-0.1-py3.4.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing role2rdme-0.1-py3.4.egg
creating /usr/lib/python3.4/site-packages/role2rdme-0.1-py3.4.egg
Extracting role2rdme-0.1-py3.4.egg to /usr/lib/python3.4/site-packages
Adding role2rdme 0.1 to easy-install.pth file
Installed /usr/lib/python3.4/site-packages/role2rdme-0.1-py3.4.egg
Processing dependencies for role2rdme==0.1
Searching for yaml
Reading https://pypi.python.org/simple/yaml/
No local packages or download links found for yaml
error: Could not find suitable distribution for Requirement.parse('yaml')
I changed the package to pyyaml
(stack-overflow reference)
Does yaml
package installation work for Ubuntu?
Convert default variable usage to values.
example of the problem:
---
var1: "Hello world!"
var2: {{ var1 }}
default value with be var1
instead of "Hello World"
Write a README.md with example and how to use
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.