ansible/hacking/templates/man.j2
Dag Wieers 66fb7fd9de Make use of yes/no booleans in playbooks
At the moment Ansible prefers yes/no for module booleans, however booleans in playbooks are still using True/False, rather than yes/no. This changes modifies boolean uses in playbooks (and man pages) to favor yes/no rather than True/False.

This change includes:

- Adaptation of documentation and examples to favor yes/no
- Modification to manpage output to favor yes/no (the docsite output already favors yes/no)
2012-12-14 11:56:53 +01:00

66 lines
1.6 KiB
Django/Jinja

.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 | jpfunc }@
{% endfor %}
." ------ OPTIONS
."
."
{% if options %}
.SH OPTIONS
{% for k in option_keys %}
{% set v = options[k] %}
.IP @{ k }@
{% for desc in v.description %}@{ desc | jpfunc }@{% 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 | jpfunc }@
{% endfor %}
{% endif %}
."
."
." ------ EXAMPLES
{% if examples is defined %}
.SH EXAMPLES
{% for e in examples %}
.PP
{% if e['description'] %}
@{ e['description'] | jpfunc }@
{% endif %}
.nf
@{ e['code'] }@
.fi
{% endfor %}
{% endif %}
." ------- AUTHOR
{% if author is defined %}
.SH AUTHOR
@{ author }@
{% endif %}
.SH SEE ALSO
.IR ansible (1),
.I http://ansible.github.com/modules.html#@{docuri}@