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
349af83c
Commit
349af83c
authored
Sep 30, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1164 from jpmens/modformatter
module_formatter now also uses Jinja2 trim_blocks
parents
1290aa26
e4338d0c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
19 deletions
+22
-19
hacking/module_formatter.py
+1
-0
hacking/templates/man.j2
+20
-18
library/facter
+1
-1
No files found.
hacking/module_formatter.py
View file @
349af83c
...
...
@@ -221,6 +221,7 @@ def main():
env
=
Environment
(
loader
=
FileSystemLoader
(
args
.
template_dir
),
variable_start_string
=
"@{"
,
variable_end_string
=
"}@"
,
trim_blocks
=
True
,
)
env
.
globals
[
'xline'
]
=
rst_xline
...
...
hacking/templates/man.j2
View file @
349af83c
...
...
@@ -4,56 +4,58 @@
@{ module }@ \- @{ short_description }@
." ------ DESCRIPTION
.SH DESCRIPTION
{% for desc in description
-
%}
{% for desc in description %}
.PP
@{ desc | jpfunc }@
{% endfor %}
." ------ OPTIONS
."
."
{% if options
-
%}
{% if options %}
.SH OPTIONS
{% for (k,v) in options.iteritems() %}
.IP @{ k }@
{% for desc in v.description
-%}@{ desc | jpfunc }@{% endfor -
%}
{% for desc in v.description
%}@{ desc | jpfunc }@{% endfor
%}
{% if v.get('choices') %}
.IR Choices :
{% for choice in v.get('choices',[])
-%}@{ choice }@{% if not loop.last %},{%else%}.{%endif-%}{% endfor -
%}{% endif %}
{% if v.get('required') %}(required){% endif
-
%}
{% if v.get('default') %} (default: @{ v.get('default') }@){% endif
-
%}
{% for choice in v.get('choices',[])
%}@{ choice }@{% if not loop.last %},{%else%}.{%endif%}{% endfor
%}{% endif %}
{% if v.get('required') %}(required){% endif %}
{% if v.get('default') %} (default: @{ v.get('default') }@){% endif %}
{#---------------------------------------------- #}
{% if v.get('version_added')
-
%}
{% if v.get('version_added') %}
(Added in Ansible version @{ v.get('version_added') }@.)
{% endif
-
%}
{% endif %}
{% endfor %}
{% endif %}
."
."
." ------ NOTES
{% if notes
-
%}
{% if notes %}
.SH NOTES
{% for note in notes
-
%}
{% for note in notes %}
.PP
@{ note | jpfunc }@
{% endfor
-
%}
{% endif
-
%}
{% endfor %}
{% endif %}
."
."
." ------ EXAMPLES
{% if examples is defined
-
%}
{% if examples is defined %}
.SH EXAMPLES
{% for e in examples
-
%}
{% for e in examples %}
.PP
.nf
@{ e['code'] }@
.fi
{% endfor
-
%}
{% endif
-
%}
{% endfor %}
{% endif %}
." ------- AUTHOR
{% if author is defined
-
%}
{% if author is defined %}
.SH AUTHOR
@{ author }@
{% endif
-
%}
{% endif %}
.SH SEE ALSO
.IR ansible (1),
.I http://ansible.github.com/modules.html#@{docuri}@
library/facter
View file @
349af83c
...
...
@@ -23,7 +23,7 @@
DOCUMENTATION
=
'''
---
module: facter
short_description: Runs the discovery program
‘facter’
on the remote system
short_description: Runs the discovery program
I(facter)
on the remote system
description:
- Runs the discovery program I(facter) on the remote system, returning JSON
data that can be useful for inventory purposes.
...
...
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