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
626203a7
Commit
626203a7
authored
Nov 03, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Module documentation should have options sorted
parent
c96f2c96
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
4 deletions
+14
-4
hacking/module_formatter.py
+7
-1
hacking/templates/rst.j2
+2
-1
library/facter
+1
-1
library/ohai
+1
-1
library/ping
+1
-0
library/raw
+1
-0
library/setup
+1
-0
No files found.
hacking/module_formatter.py
View file @
626203a7
...
@@ -251,7 +251,7 @@ def main():
...
@@ -251,7 +251,7 @@ def main():
variable_start_string
=
"@{"
,
variable_start_string
=
"@{"
,
variable_end_string
=
"}@"
,
variable_end_string
=
"}@"
,
trim_blocks
=
True
,
trim_blocks
=
True
,
)
)
env
.
globals
[
'xline'
]
=
rst_xline
env
.
globals
[
'xline'
]
=
rst_xline
...
@@ -334,6 +334,12 @@ def main():
...
@@ -334,6 +334,12 @@ def main():
if
not
doc
is
None
:
if
not
doc
is
None
:
all_keys
=
[]
for
(
k
,
v
)
in
doc
[
'options'
]
.
iteritems
():
all_keys
.
append
(
k
)
all_keys
=
sorted
(
all_keys
)
doc
[
'option_keys'
]
=
all_keys
doc
[
'filename'
]
=
fname
doc
[
'filename'
]
=
fname
doc
[
'docuri'
]
=
doc
[
'module'
]
.
replace
(
'_'
,
'-'
)
doc
[
'docuri'
]
=
doc
[
'module'
]
.
replace
(
'_'
,
'-'
)
doc
[
'now_date'
]
=
datetime
.
date
.
today
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
doc
[
'now_date'
]
=
datetime
.
date
.
today
()
.
strftime
(
'
%
Y-
%
m-
%
d'
)
...
...
hacking/templates/rst.j2
View file @
626203a7
...
@@ -29,7 +29,8 @@
...
@@ -29,7 +29,8 @@
<th class="head">choices</th>
<th class="head">choices</th>
<th class="head">comments</th>
<th class="head">comments</th>
</tr>
</tr>
{% for (k,v) in options.iteritems() %}
{% for k in option_keys %}
{% set v = options[k] %}
<tr>
<tr>
<td>@{ k }@</td>
<td>@{ k }@</td>
<td>{% if v.get('required', False) %}yes{% else %}no{% endif %}</td>
<td>{% if v.get('required', False) %}yes{% else %}no{% endif %}</td>
...
...
library/facter
View file @
626203a7
...
@@ -29,7 +29,7 @@ description:
...
@@ -29,7 +29,7 @@ description:
(U(https://github.com/puppetlabs/facter)) on the remote system, returning
(U(https://github.com/puppetlabs/facter)) on the remote system, returning
JSON data that can be useful for inventory purposes.
JSON data that can be useful for inventory purposes.
version_added: "0.2"
version_added: "0.2"
options:
[]
options:
{}
examples:
examples:
- code: ansible www.example.net -m facter
- code: ansible www.example.net -m facter
description: "Example command-line invocation"
description: "Example command-line invocation"
...
...
library/ohai
View file @
626203a7
...
@@ -29,7 +29,7 @@ description:
...
@@ -29,7 +29,7 @@ description:
returns JSON inventory data.
returns JSON inventory data.
I(Ohai) data is a bit more verbose and nested than I(facter).
I(Ohai) data is a bit more verbose and nested than I(facter).
version_added: "0.6"
version_added: "0.6"
options:
[]
options:
{}
examples:
examples:
- code: ansible webservers -m ohai --tree=/tmp/ohaidata
- code: ansible webservers -m ohai --tree=/tmp/ohaidata
description: "Retrieve I(ohai) data from all Web servers and store in one-file per host"
description: "Retrieve I(ohai) data from all Web servers and store in one-file per host"
...
...
library/ping
View file @
626203a7
...
@@ -27,6 +27,7 @@ description:
...
@@ -27,6 +27,7 @@ description:
- A trivial test module, this module always returns 'pong' on successful
- A trivial test module, this module always returns 'pong' on successful
contact. It does not make sense in playbooks, but is useful from
contact. It does not make sense in playbooks, but is useful from
C(/usr/bin/ansible)
C(/usr/bin/ansible)
options: {}
examples:
examples:
- code: ansible webservers -m ping
- code: ansible webservers -m ping
description: Test 'webservers' status
description: Test 'webservers' status
...
...
library/raw
View file @
626203a7
...
@@ -4,6 +4,7 @@ DOCUMENTATION = '''
...
@@ -4,6 +4,7 @@ DOCUMENTATION = '''
---
---
module: raw
module: raw
short_description: Executes a low-down and dirty SSH command
short_description: Executes a low-down and dirty SSH command
options: {}
description:
description:
- Executes a low-down and dirty SSH command, not going through the module
- Executes a low-down and dirty SSH command, not going through the module
subsystem. This is useful and should only be done in two cases. The
subsystem. This is useful and should only be done in two cases. The
...
...
library/setup
View file @
626203a7
...
@@ -30,6 +30,7 @@ DOCUMENTATION = '''
...
@@ -30,6 +30,7 @@ DOCUMENTATION = '''
---
---
module: setup
module: setup
short_description: Gathers facts about remote hosts
short_description: Gathers facts about remote hosts
options: {}
description:
description:
- This module is automatically called by playbooks to gather useful
- This module is automatically called by playbooks to gather useful
variables about remote hosts that can be used in playbooks. It can also be
variables about remote hosts that can be used in playbooks. It can also be
...
...
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