summaryrefslogtreecommitdiff
path: root/hacking/templates/man.j2
blob: 8bd3644cbd544e2d61f94d711b351d117ebc0205 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{% set name = ('ansible' if cli == 'adhoc' else 'ansible-%s' % cli) -%}
{{name}}
{{ '=' * ( name|length|int ) }}

{{ '-' * ( short_desc|default('')|string|length|int ) }}
{{short_desc|default('')}}
{{ '-' * ( short_desc|default('')|string|length|int ) }}

:Version:        Ansible %VERSION%
:Manual section: 1
:Manual group:   System administration commands



SYNOPSIS
--------
{{ usage|replace('%prog', name) }}


DESCRIPTION
-----------
{{ long_desc|default('', True)|wordwrap }}

{% if options %}
COMMON OPTIONS
--------------
{% for option in options|sort(attribute='options') %}
{% for switch in option['options'] %}**{{switch}}**{% if option['arg'] %} '{{option['arg']}}'{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}

  {{ option['desc'] }}
{% endfor %}
{% endif %}

{% if arguments %}
ARGUMENTS
---------

{% for arg in arguments %}
{{ arg }}

{{ (arguments[arg]|default(' '))|wordwrap }}

{% endfor %}
{% endif %}

{% if actions %}
ACTIONS
-------
{% for action in actions %}
**{{ action }}**
  {{ (actions[action]['desc']|default(' ')) |replace('\n', ' ')}}

{% if actions[action]['options'] %}
{% for option in actions[action]['options']|sort(attribute='options') %}
{% for switch in option['options'] if switch in actions[action]['option_names'] %}  **{{switch}}**{% if option['arg'] %} '{{option['arg']}}'{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}

        {{ (option['desc']) }}
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}


{% if inventory %}
INVENTORY
---------

Ansible stores the hosts it can potentially operate on in an inventory.
This can be an YAML file, ini-like file, a script, directory, list, etc.
For additional options, see the documentation on https://docs.ansible.com/.

{% endif %}
ENVIRONMENT
-----------

The following environment variables may be specified.

{% if inventory %}
ANSIBLE_INVENTORY  -- Override the default ansible inventory sources

{% endif %}
{% if library %}
ANSIBLE_LIBRARY -- Override the default ansible module library path

{% endif %}
ANSIBLE_CONFIG -- Specify override location for the ansible config file

Many more are available for most options in ansible.cfg

For a full list check https://docs.ansible.com/. or use the `ansible-config` command.

FILES
-----

{% if inventory %}
/etc/ansible/hosts -- Default inventory file

{% endif %}
/etc/ansible/ansible.cfg -- Config file, used if present

~/.ansible.cfg -- User config file, overrides the default config if present

./ansible.cfg -- Local config file (in current working directory) assumed to be 'project specific' and overrides the rest if present.

As mentioned above, the ANSIBLE_CONFIG environment variable will override all others.

AUTHOR
------

Ansible was originally written by Michael DeHaan.


COPYRIGHT
---------

Copyright © 2018 Red Hat, Inc | Ansible.
Ansible is released under the terms of the GPLv3 license.


SEE ALSO
--------

{% for other in cli_list|sort %}{% if other != cli %}**ansible{% if other != 'adhoc' %}-{{other}}{% endif %}** (1){% if not loop.last %}, {% endif %}{% endif %}{% endfor %}

Extensive documentation is available in the documentation site:
<https://docs.ansible.com>.
IRC and mailing list info can be found in file CONTRIBUTING.md,
available in: <https://github.com/ansible/ansible>