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
a5e8e10b
Commit
a5e8e10b
authored
Dec 25, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused things.
parent
f4aa6c53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
97 deletions
+0
-97
hacking/module_formatter.py
+0
-23
hacking/templates/man.j2
+0
-74
No files found.
hacking/module_formatter.py
View file @
a5e8e10b
...
...
@@ -114,24 +114,6 @@ def write_data(text, options, outputname, module):
#####################################################################################
def
boilerplate
():
''' prints the boilerplate for module docs '''
if
not
os
.
path
.
exists
(
EXAMPLE_YAML
):
print
>>
sys
.
stderr
,
"Missing example boiler plate:
%
s"
%
EXAMPLE_YAML
print
"DOCUMENTATION = '''"
print
file
(
EXAMPLE_YAML
)
.
read
()
print
"'''"
print
""
print
""
print
"EXAMPLES = '''"
print
"# example of doing ___ from a playbook"
print
"your_module: some_arg=1 other_arg=2"
print
"'''"
print
""
#####################################################################################
def
list_modules
(
module_dir
):
''' returns a hash of categories, each category being a hash of module names to file paths '''
...
...
@@ -167,7 +149,6 @@ def generate_parser():
p
.
add_option
(
"-v"
,
"--verbose"
,
action
=
'store_true'
,
default
=
False
,
help
=
"Verbose"
)
p
.
add_option
(
"-o"
,
"--output-dir"
,
action
=
"store"
,
dest
=
"output_dir"
,
default
=
None
,
help
=
"Output directory for module files"
)
p
.
add_option
(
"-I"
,
"--includes-file"
,
action
=
"store"
,
dest
=
"includes_file"
,
default
=
None
,
help
=
"Create a file containing list of processed modules"
)
p
.
add_option
(
"-G"
,
"--generate"
,
action
=
"store_true"
,
dest
=
"do_boilerplate"
,
default
=
False
,
help
=
"generate boilerplate docs to stdout"
)
p
.
add_option
(
'-V'
,
action
=
'version'
,
help
=
'Show version number and exit'
)
return
p
...
...
@@ -294,10 +275,6 @@ def process_category(category, categories, options, env, template, outputname):
def
validate_options
(
options
):
''' validate option parser options '''
if
options
.
do_boilerplate
:
boilerplate
()
sys
.
exit
(
0
)
if
not
options
.
module_dir
:
print
>>
sys
.
stderr
,
"--module-dir is required"
sys
.
exit
(
1
)
...
...
hacking/templates/man.j2
deleted
100644 → 0
View file @
f4aa6c53
.TH ANSIBLE.@{ module | upper }@ 3 "@{ now_date }@" "@{ ansible_version }@" "ANSIBLE MODULES"
.\" generated from @{ filename }@
.SH NAME
@{ module }@ \- @{ short_description }@
.\" ------ DESCRIPTION
.SH DESCRIPTION
{% for desc in description %}
.PP
@{ desc | convert_symbols_to_format }@
{% endfor %}
.\" ------ OPTIONS
.\"
.\"
{% if options %}
.SH OPTIONS
{% for k in option_keys %}
{% set v = options[k] %}
.IP @{ k }@
{% for desc in v.description %}@{ desc | convert_symbols_to_format }@{% endfor %}
{% if v.get('choices') %}
.IR Choices :
{% for choice in v.get('choices',[]) %}{% if choice == True %}yes{%elif choice == False %}no{% else %}@{ choice }@{% endif %}{% if not loop.last %},{%else%}.{%endif%}{% endfor %}{% endif %}
{% if v.get('required') %}(required){% endif %}
{% if v.get('default') %} (default: {% if v.get('default') == True %}yes{%elif v.get('default') == False %}no{% else %}@{ v.get('default') }@){% endif %}{% endif %}
{#---------------------------------------------- #}
{% if v.get('version_added') %}
(Added in Ansible version @{ v.get('version_added') }@.)
{% endif %}
{% endfor %}
{% endif %}
.\"
.\"
.\" ------ NOTES
{% if notes %}
.SH NOTES
{% for note in notes %}
.PP
@{ note | convert_symbols_to_format }@
{% endfor %}
{% endif %}
.\"
.\"
.\" ------ EXAMPLES
{% if examples is defined %}
.SH EXAMPLES
{% for e in examples %}
.PP
{% if e['description'] %}
@{ e['description'] | convert_symbols_to_format }@
{% endif %}
.nf
@{ e['code'] }@
.fi
{% endfor %}
{% endif %}
.\" ------ PLAINEXAMPLES
{% if plainexamples is defined %}
.SH EXAMPLES
.nf
@{ plainexamples }@
.fi
{% endif %}
.\" ------- AUTHOR
{% if author is defined %}
.SH AUTHOR
@{ author }@
{% endif %}
.SH SEE ALSO
.IR ansible (1),
.I http://ansible.github.com/modules.html#@{docuri}@
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