summaryrefslogtreecommitdiff
path: root/docs/man/man1/ansible-galaxy.1.asciidoc.in
blob: 44f0b46b085fc8d790f5d260da9f67bbdefc9227 (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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
ansible-galaxy(1)
===================
:doctype:      manpage
:man source:   Ansible
:man version:  %VERSION%
:man manual:   System administration commands

NAME
----
ansible-galaxy - manage roles using galaxy.ansible.com


SYNOPSIS
--------
ansible-galaxy [delete|import|info|init|install|list|login|remove|search|setup] [--help] [options] ...


DESCRIPTION
-----------

*Ansible Galaxy* is a shared repository for Ansible roles.
The ansible-galaxy command can be used to manage these roles,
or for creating a skeleton framework for roles you'd like to upload to Galaxy.

COMMON OPTIONS
--------------

*-h*, *--help*::

Show a help message related to the given sub-command.

INSTALL
-------

The *install* sub-command is used to install roles.

USAGE
~~~~~

$ ansible-galaxy install [options] [-r FILE | role_name(s)[,version] | tar_file(s)]

Roles can be installed in several different ways:

* A username.rolename[,version] - this will install a single role. The Galaxy
  API will be contacted to provide the information about the role, and the
  corresponding .tar.gz will be downloaded from *github.com*. If the version
  is omitted, the most recent version available will be installed.

* A file name, using *-r* - this will install multiple roles listed one per
  line. The format of each line is the same as above: username.rolename[,version]

* A .tar.gz of a valid role you've downloaded directly from *github.com*. This
  is mainly useful when the system running Ansible does not have access to
  the Galaxy API, for instance when behind a firewall or proxy.


OPTIONS
~~~~~~~

*-f*, *--force*::

Force overwriting an existing role.

*-i*, *--ignore-errors*::

Ignore errors and continue with the next specified role.

*-n*, *--no-deps*::

Don't download roles listed as dependencies.

*-p* 'ROLES_PATH', *--roles-path=*'ROLES_PATH'::

The path to the directory containing your roles. The default is the *roles_path* 
configured in your *ansible.cfg* file (/etc/ansible/roles if not configured)

*-r* 'ROLE_FILE', *--role-file=*'ROLE_FILE'::

A file containing a list of roles to be imported, as specified above. This
option cannot be used if a rolename or .tar.gz have been specified.

REMOVE
------

The *remove* sub-command is used to remove one or more roles.

USAGE
~~~~~

$ ansible-galaxy remove role1 role2 ...

OPTIONS
~~~~~~~

*-p* 'ROLES_PATH', *--roles-path=*'ROLES_PATH'::

The path to the directory containing your roles. The default is the *roles_path* 
configured in your *ansible.cfg* file (/etc/ansible/roles if not configured)

INIT
----

The *init* command is used to create an empty role suitable for uploading
to https://galaxy.ansible.com (or for roles in general).

USAGE
~~~~~

$ ansible-galaxy init [options] role_name

OPTIONS
~~~~~~~

*-f*, *--force*::

Force overwriting an existing role.

*-p* 'INIT_PATH', *--init-path=*'INIT_PATH'::

The path in which the skeleton role will be created.The default is the current 
working directory.

*--offline*::

Don't query the galaxy API when creating roles

LIST
----

The *list* sub-command is used to show what roles are currently instaled.
You can specify a role name, and if installed only that role will be shown.

USAGE
~~~~~

$ ansible-galaxy list [role_name]

OPTIONS
~~~~~~~

*-p* 'ROLES_PATH', *--roles-path=*'ROLES_PATH'::

The path to the directory containing your roles. The default is the *roles_path*
configured in your *ansible.cfg* file (/etc/ansible/roles if not configured)


SEARCH
------

The *search* sub-command returns a filtered list of roles found at
galaxy.ansible.com.

USAGE
~~~~~

$ ansible-galaxy search [options] [searchterm1 searchterm2]


OPTIONS
~~~~~~~
*--galaxy-tags*::

Provide a comma separated list of Galaxy Tags on which to filter.

*--platforms*::

Provide a comma separated list of Platforms on which to filter.

*--author*::

Specify the username of a Galaxy contributor on which to filter.

*-c*, *--ingore-certs*::

Ignore TLS certificate errors. 

*-s*, *--server*::

Override the default server https://galaxy.ansible.com.


INFO
----

The *info* sub-command shows detailed information for a specific role.
Details returned about the role included information from the local copy
as well as information from galaxy.ansible.com.

USAGE
~~~~~

$ ansible-galaxy info [options] role_name[, version]

OPTIONS
~~~~~~~

*-p* 'ROLES_PATH', *--roles-path=*'ROLES_PATH'::

The path to the directory containing your roles. The default is the *roles_path* 
configured in your *ansible.cfg* file (/etc/ansible/roles if not configured)

*-c*, *--ingore-certs*::

Ignore TLS certificate errors. 

*-s*, *--server*::

Override the default server https://galaxy.ansible.com.


LOGIN
-----

The *login* sub-command is used to authenticate with galaxy.ansible.com. 
Authentication is required to use the import, delete and setup commands.
It will authenticate the user,retrieve a token from Galaxy, and store it
in the user's home directory.

USAGE
~~~~~

$ ansible-galaxy login [options]

The *login* sub-command prompts for a *GitHub* username and password. It does
NOT send your password to Galaxy. It actually authenticates with GitHub and
creates a personal access token. It then sends the personal access token to
Galaxy, which in turn verifies that you are you and returns a Galaxy access
token. After authentication completes the *GitHub* personal access token is
destroyed. 

If you do not wish to use your GitHub password, or if you have two-factor
authentication enabled with GitHub, use the *--github-token* option to pass a
personal access token that you create. Log into GitHub, go to Settings and
click on Personal Access Token to create a token.

OPTIONS
~~~~~~~

*-c*, *--ingore-certs*::

Ignore TLS certificate errors. 

*-s*, *--server*::

Override the default server https://galaxy.ansible.com.

*--github-token*::

Authenticate using a *GitHub* personal access token rather than a password.


IMPORT
------

Import a role from *GitHub* to galaxy.ansible.com. Requires the user first
authenticate with galaxy.ansible.com using the *login* subcommand.

USAGE
~~~~~

$ ansible-galaxy import [options] github_user github_repo

OPTIONS
~~~~~~~
*-c*, *--ingore-certs*::

Ignore TLS certificate errors. 

*-s*, *--server*::

Override the default server https://galaxy.ansible.com.

*--branch*::

Provide a specific branch to import. When a branch is not specified the
branch found in meta/main.yml is used. If no branch is specified in
meta/main.yml, the repo's default branch (usually master) is used.


DELETE
------

The *delete* sub-command will delete a role from galaxy.ansible.com. Requires
the user first authenticate with galaxy.ansible.com using the *login* subcommand.

USAGE
~~~~~

$ ansible-galaxy delete [options] github_user github_repo

OPTIONS
~~~~~~~

*-c*, *--ingore-certs*::

Ignore TLS certificate errors. 

*-s*, *--server*::

Override the default server https://galaxy.ansible.com.


SETUP
-----

The *setup* sub-command creates an integration point for *Travis CI*, enabling 
galaxy.ansible.com to receive notifications from *Travis* on build completion.
Requires the user first authenticate with galaxy.ansible.com using the *login*
subcommand.

USAGE
~~~~~

$ ansible-galaxy setup [options] source github_user github_repo secret

* Use *travis* as the source value. In the future additional source values may
  be added.

* Provide your *Travis* user token as the secret. The token is not stored by
  galaxy.ansible.com. A hash is created using github_user, github_repo
  and your token. The hash value is what actually gets stored.

OPTIONS
~~~~~~~

*-c*, *--ingore-certs*::

Ignore TLS certificate errors. 

*-s*, *--server*::

Override the default server https://galaxy.ansible.com.

--list::

Show your configured integrations. Provids the ID of each integration
which can be used with the remove option.

--remove::

Remove a specific integration. Provide the ID of the integration to 
be removed.

AUTHOR
------

Ansible was originally written by Michael DeHaan. See the AUTHORS file
for a complete list of contributors.


COPYRIGHT
---------

Copyright © 2014, Michael DeHaan

Ansible is released under the terms of the GPLv3 License.


SEE ALSO
--------

*ansible*(1), *ansible-pull*(1), *ansible-doc*(1), *ansible-playbook*(1), *ansible-vault*(1)

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