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
887cb765
Commit
887cb765
authored
Mar 16, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6004 from res0nat0r/fix_ansible-doc_snippets
Fix ansible-doc option output.
parents
0bc3cec1
e1b72782
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
bin/ansible-doc
+8
-3
No files found.
bin/ansible-doc
View file @
887cb765
...
...
@@ -98,7 +98,7 @@ def get_man_text(doc):
if
'option_keys'
in
doc
and
len
(
doc
[
'option_keys'
])
>
0
:
text
.
append
(
"Options (= is mandatory):
\n
"
)
for
o
in
doc
[
'option_keys'
]
:
for
o
in
sorted
(
doc
[
'option_keys'
])
:
opt
=
doc
[
'options'
][
o
]
if
opt
.
get
(
'required'
,
False
):
...
...
@@ -146,10 +146,15 @@ def get_snippet_text(doc):
text
.
append
(
"- name:
%
s"
%
(
desc
))
text
.
append
(
" action:
%
s"
%
(
doc
[
'module'
]))
for
o
in
doc
[
'options'
]
:
for
o
in
sorted
(
doc
[
'options'
]
.
keys
())
:
opt
=
doc
[
'options'
][
o
]
desc
=
tty_ify
(
""
.
join
(
opt
[
'description'
]))
s
=
o
+
"="
if
opt
.
get
(
'required'
,
False
):
s
=
o
+
"="
else
:
s
=
o
text
.
append
(
"
%-20
s #
%
s"
%
(
s
,
desc
))
text
.
append
(
''
)
...
...
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