Debian Codegraph @

packaging/cli-doc/man.j2

raw
1 {% macro render_action(parent, action, action_docs) -%}
2 **{{ parent + action }}**
3 {{ (action_docs['desc']|default(' ')) |replace('\n', ' ')}}
4
5 {% if action_docs['options'] %}
6 {% for option in action_docs['options']|sort(attribute='options') %}
7 {% for switch in option['options'] if switch in action_docs['option_names'] %} **{{switch}}**{% if option['arg'] %} '{{option['arg']}}'{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}
8
9 {{ (option['desc']) }}
10 {% endfor %}
11 {% endif %}
12
13 {% set nested_actions = action_docs['actions'] %}
14 {% if nested_actions %}
15 {% for nested_action in nested_actions %}
16 {{ render_action(parent + action + ' ', nested_action, nested_actions[nested_action]) }}
17 {% endfor %}
18 {% endif %}
19
20 {%- endmacro %}
21
22 {{ cli_name }}
23 {{ '=' * ( cli_name|length|int ) }}
24
25 {{ '-' * ( short_desc|default('')|string|length|int ) }}
26 {{short_desc|default('')}}
27 {{ '-' * ( short_desc|default('')|string|length|int ) }}
28
29 :Version: Ansible {{ version }}
30 :Manual section: 1
31 :Manual group: System administration commands
32
33
34
35 SYNOPSIS
36 --------
37 {{ usage|replace('%prog', cli_name) }}
38
39
40 DESCRIPTION
41 -----------
42 {{ long_desc|default('', True)|wordwrap }}
43
44 {% if options %}
45 COMMON OPTIONS
46 --------------
47 {% for option in options|sort(attribute='options') %}
48 {% for switch in option['options'] %}**{{switch}}**{% if option['arg'] %} '{{option['arg']}}'{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}
49
50 {{ option['desc'] }}
51 {% endfor %}
52 {% endif %}
53
54 {% if arguments %}
55 ARGUMENTS
56 ---------
57
58 {% for arg in arguments %}
59 {{ arg }}
60
61 {{ (arguments[arg]|default(' '))|wordwrap }}
62
63 {% endfor %}
64 {% endif %}
65
66 {% if actions %}
67 ACTIONS
68 -------
69 {% for action in actions %}
70 {{ render_action('', action, actions[action]) }}
71 {% endfor %}
72 {% endif %}
73
74
75 {% if inventory %}
76 INVENTORY
77 ---------
78
79 Ansible stores the hosts it can potentially operate on in an inventory.
80 This can be an YAML file, ini-like file, a script, directory, list, etc.
81 For additional options, see the documentation on https://docs.ansible.com/.
82
83 {% endif %}
84 ENVIRONMENT
85 -----------
86
87 The following environment variables may be specified.
88
89 {% if inventory %}
90 ANSIBLE_INVENTORY -- Override the default ansible inventory sources
91
92 {% endif %}
93 {% if library %}
94 ANSIBLE_LIBRARY -- Override the default ansible module library path
95
96 {% endif %}
97 ANSIBLE_CONFIG -- Specify override location for the ansible config file
98
99 Many more are available for most options in ansible.cfg
100
101 For a full list check https://docs.ansible.com/. or use the `ansible-config` command.
102
103 FILES
104 -----
105
106 {% if inventory %}
107 /etc/ansible/hosts -- Default inventory file
108
109 {% endif %}
110 /etc/ansible/ansible.cfg -- Config file, used if present
111
112 ~/.ansible.cfg -- User config file, overrides the default config if present
113
114 ./ansible.cfg -- Local config file (in current working directory) assumed to be 'project specific' and overrides the rest if present.
115
116 As mentioned above, the ANSIBLE_CONFIG environment variable will override all others.
117
118 AUTHOR
119 ------
120
121 Ansible was originally written by Michael DeHaan.
122
123
124 COPYRIGHT
125 ---------
126
127 Copyright © 2018 Red Hat, Inc | Ansible.
128 Ansible is released under the terms of the GPLv3 license.
129
130
131 SEE ALSO
132 --------
133
134 {% for other in cli_bin_name_list|sort %}{% if other != cli_name %}**{{ other }}** (1){% if not loop.last %}, {% endif %}{% endif %}{% endfor %}
135
136 Extensive documentation is available in the documentation site:
137 <https://docs.ansible.com>.
138 IRC and mailing list info can be found in file CONTRIBUTING.md,
139 available in: <https://github.com/ansible/ansible>