Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
c3076b84
Commit
c3076b84
authored
Mar 20, 2015
by
Brian Coca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added module returnval documentation to web docs
parent
64b447f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
8 deletions
+50
-8
hacking/module_formatter.py
+4
-1
hacking/templates/rst.j2
+46
-7
No files found.
hacking/module_formatter.py
View file @
c3076b84
...
@@ -289,7 +289,10 @@ def process_module(module, options, env, template, outputname, module_map, alias
...
@@ -289,7 +289,10 @@ def process_module(module, options, env, template, outputname, module_map, alias
doc
[
'now_date'
]
=
datetime
.
date
.
today
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
doc
[
'now_date'
]
=
datetime
.
date
.
today
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
doc
[
'ansible_version'
]
=
options
.
ansible_version
doc
[
'ansible_version'
]
=
options
.
ansible_version
doc
[
'plainexamples'
]
=
examples
#plain text
doc
[
'plainexamples'
]
=
examples
#plain text
doc
[
'returndocs'
]
=
returndocs
if
returndocs
:
doc
[
'returndocs'
]
=
yaml
.
safe_load
(
returndocs
)
else
:
doc
[
'returndocs'
]
=
None
# here is where we build the table of contents...
# here is where we build the table of contents...
...
...
hacking/templates/rst.j2
View file @
c3076b84
...
@@ -111,18 +111,57 @@ Examples
...
@@ -111,18 +111,57 @@ Examples
Return Values
Return Values
-------------
-------------
Common return values are documented here :
:doc:
:`common_return_values`, the following are the fields unique to this module:
Common return values are documented here :
doc
:`common_return_values`, the following are the fields unique to this module:
.. raw:: html
.. raw:: html
<p>
<table border=1 cellpadding=4>
<pre>
<tr>
@{ returndocs }@
<th class="head">name</th>
</pre>
<th class="head">despcription</th>
</p>
<th class="head">returned</th>
<th class="head">type</th>
<th class="head">sample</th>
</tr>
::
{% for entry in returndocs %}
<tr>
<td> @{ entry }@ </td>
<td> @{ returndocs[entry].description }@ </td>
<td align=center> @{ returndocs[entry].returned }@ </td>
<td align=center> @{ returndocs[entry].type }@ </td>
<td align=center> @{ returndocs[entry].sample}@ </td>
</tr>
{% if returndocs[entry].type == 'dictionary' %}
<tr><td>contains: </td>
<td colspan=4>
<table border=1 cellpadding=2>
<tr>
<th class="head">name</th>
<th class="head">despcription</th>
<th class="head">returned</th>
<th class="head">type</th>
<th class="head">sample</th>
</tr>
{% for sub in returndocs[entry].contains %}
<tr>
<td> @{ sub }@ </td>
<td> @{ returndocs[entry].contains[sub].description }@ </td>
<td align=center> @{ returndocs[entry].contains[sub].returned }@ </td>
<td align=center> @{ returndocs[entry].contains[sub].type }@ </td>
<td align=center> @{ returndocs[entry].contains[sub].sample}@ </td>
</tr>
{% endfor %}
</table>
</td></tr>
{% endif %}
{% endfor %}
</table>
</br></br>
{% endif %}
{% endif %}
{% if notes %}
{% if notes %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment