1ANSIBLE-GALAXY(1)       System administration commands       ANSIBLE-GALAXY(1)
2
3
4

NAME

6       ansible-galaxy  -  Perform  various  Role and Collection related opera‐
7       tions.
8

SYNOPSIS

10       usage: ansible-galaxy [-h] [--version] [-v] TYPE ...
11

DESCRIPTION

13       Command to manage Ansible roles and collections.
14
15       None of the CLI tools are designed to run concurrently with themselves.
16       Use  an external scheduler and/or locking to ensure there are no clash‐
17       ing operations.
18

COMMON OPTIONS

20       --version
21          show program's version number, config file location, configured mod‐
22          ule search path, module location, executable location and exit
23
24       -h, --help
25          show this help message and exit
26
27       -v, --verbose
28          Causes Ansible to print more debug messages. Adding multiple -v will
29          increase the verbosity, the builtin plugins currently evaluate up to
30          -vvvvvv.  A  reasonable level to start is -vvv, connection debugging
31          might require -vvvv.
32

ACTIONS

34       collection
35              Perform the action on an Ansible Galaxy collection. Must be com‐
36              bined with a further action like init/install as listed below.
37
38       collection download
39              Download  collections and their dependencies as a tarball for an
40              offline install.
41
42              --clear-response-cache
43                 Clear the existing server response cache.
44
45              --no-cache
46                 Do not use the server response cache.
47
48              --pre
49                 Include pre-release  versions.  Semantic  versioning  pre-re‐
50                 leases are ignored by default
51
52              --timeout 'TIMEOUT'
53                 The  time  to  wait for operations against the galaxy server,
54                 defaults to 60s.
55
56              --token 'API_KEY',   --api-key 'API_KEY'
57                 The  Ansible  Galaxy  API  key  which   can   be   found   at
58                 https://galaxy.ansible.com/me/preferences.
59
60              -c,   --ignore-certs
61                 Ignore SSL certificate validation errors.
62
63              -n,   --no-deps
64                 Don't download collection(s) listed as dependencies.
65
66              -p 'DOWNLOAD_PATH',   --download-path 'DOWNLOAD_PATH'
67                 The directory to download the collections to.
68
69              -r 'REQUIREMENTS',   --requirements-file 'REQUIREMENTS'
70                 A file containing a list of collections to be downloaded.
71
72              -s 'API_SERVER',   --server 'API_SERVER'
73                 The Galaxy API server URL
74
75       collection init
76              Creates the skeleton framework of a role or collection that com‐
77              plies with the Galaxy metadata format. Requires a role  or  col‐
78              lection  name.  The collection name must be in the format <name‐
79              space>.<collection>.
80
81              --collection-skeleton 'COLLECTION_SKELETON'
82                 The path to a collection skeleton  that  the  new  collection
83                 should be based upon.
84
85              --init-path 'INIT_PATH'
86                 The  path  in  which the skeleton collection will be created.
87                 The default is the current working directory.
88
89              --timeout 'TIMEOUT'
90                 The time to wait for operations against  the  galaxy  server,
91                 defaults to 60s.
92
93              --token 'API_KEY',   --api-key 'API_KEY'
94                 The   Ansible   Galaxy   API   key  which  can  be  found  at
95                 https://galaxy.ansible.com/me/preferences.
96
97              -c,   --ignore-certs
98                 Ignore SSL certificate validation errors.
99
100              -f,   --force
101                 Force overwriting an existing role or collection
102
103              -s 'API_SERVER',   --server 'API_SERVER'
104                 The Galaxy API server URL
105
106       collection build
107              Build an Ansible Galaxy collection artifact that can  be  stored
108              in  a  central  repository like Ansible Galaxy. By default, this
109              command builds from the current working directory. You  can  op‐
110              tionally pass in the collection input path (where the galaxy.yml
111              file is).
112
113              --output-path 'OUTPUT_PATH'
114                 The path in which the collection is built to. The default  is
115                 the current working directory.
116
117              --timeout 'TIMEOUT'
118                 The  time  to  wait for operations against the galaxy server,
119                 defaults to 60s.
120
121              --token 'API_KEY',   --api-key 'API_KEY'
122                 The  Ansible  Galaxy  API  key  which   can   be   found   at
123                 https://galaxy.ansible.com/me/preferences.
124
125              -c,   --ignore-certs
126                 Ignore SSL certificate validation errors.
127
128              -f,   --force
129                 Force overwriting an existing role or collection
130
131              -s 'API_SERVER',   --server 'API_SERVER'
132                 The Galaxy API server URL
133
134       collection publish
135              Publish  a  collection into Ansible Galaxy. Requires the path to
136              the collection tarball to publish.
137
138              --import-timeout 'IMPORT_TIMEOUT'
139                 The time to wait for the collection import process to finish.
140
141              --no-wait
142                 Don't wait for import validation results.
143
144              --timeout 'TIMEOUT'
145                 The time to wait for operations against  the  galaxy  server,
146                 defaults to 60s.
147
148              --token 'API_KEY',   --api-key 'API_KEY'
149                 The   Ansible   Galaxy   API   key  which  can  be  found  at
150                 https://galaxy.ansible.com/me/preferences.
151
152              -c,   --ignore-certs
153                 Ignore SSL certificate validation errors.
154
155              -s 'API_SERVER',   --server 'API_SERVER'
156                 The Galaxy API server URL
157
158       collection install
159              Install one or more roles(ansible-galaxy role install),  or  one
160              or  more collections(ansible-galaxy collection install). You can
161              pass in a list (roles or collections) or  use  the  file  option
162              listed  below  (these  are mutually exclusive). If you pass in a
163              list, it can be a name (which will be downloaded via the  galaxy
164              API and github), or it can be a local tar archive file.
165
166              --clear-response-cache
167                 Clear the existing server response cache.
168
169              --disable-gpg-verify
170                 Disable  GPG  signature  verification when installing collec‐
171                 tions from a Galaxy server
172
173              --force-with-deps
174                 Force overwriting an existing collection  and  its  dependen‐
175                 cies.
176
177              --ignore-signature-status-code
178                 A  status  code  to ignore during signature verification (for
179                 example, NO_PUBKEY). Provide this option  multiple  times  to
180                 ignore  a  list of status codes. Descriptions for the choices
181                 can           be            seen            at            L(‐
182                 https://github.com/gpg/gnupg/blob/master/doc/DETAILS#gen‐
183                 eral-status-codes).
184
185              --keyring 'KEYRING'
186                 The keyring used during signature verification
187
188              --no-cache
189                 Do not use the server response cache.
190
191              --offline
192                 Install collection artifacts  (tarballs)  without  contacting
193                 any  distribution servers. This does not apply to collections
194                 in remote Git repositories or URLs to remote tarballs.
195
196              --pre
197                 Include pre-release  versions.  Semantic  versioning  pre-re‐
198                 leases are ignored by default
199
200              --required-valid-signature-count          'REQUIRED_VALID_SIGNA‐
201              TURE_COUNT'
202                 The number of signatures that must  successfully  verify  the
203                 collection.  This  should be a positive integer or -1 to sig‐
204                 nify that all signatures must be used to verify  the  collec‐
205                 tion. Prepend the value with + to fail if no valid signatures
206                 are found for the collection (e.g. +all).
207
208              --signature
209                 An additional signature source to verify the authenticity  of
210                 the  MANIFEST.json  before  installing  the collection from a
211                 Galaxy server. Use in conjunction with a  positional  collec‐
212                 tion name (mutually exclusive with --requirements-file).
213
214              --timeout 'TIMEOUT'
215                 The  time  to  wait for operations against the galaxy server,
216                 defaults to 60s.
217
218              --token 'API_KEY',   --api-key 'API_KEY'
219                 The  Ansible  Galaxy  API  key  which   can   be   found   at
220                 https://galaxy.ansible.com/me/preferences.
221
222              -U,   --upgrade
223                 Upgrade installed collection artifacts. This will also update
224                 dependencies unless --no-deps is provided
225
226              -c,   --ignore-certs
227                 Ignore SSL certificate validation errors.
228
229              -f,   --force
230                 Force overwriting an existing role or collection
231
232              -i,   --ignore-errors
233                 Ignore errors during installation and continue with the  next
234                 specified  collection.  This  will not ignore dependency con‐
235                 flict errors.
236
237              -n,   --no-deps
238                 Don't download collections listed as dependencies.
239
240              -p 'COLLECTIONS_PATH',   --collections-path 'COLLECTIONS_PATH'
241                 The path to the directory containing your collections.
242
243              -r 'REQUIREMENTS',   --requirements-file 'REQUIREMENTS'
244                 A file containing a list of collections to be installed.
245
246              -s 'API_SERVER',   --server 'API_SERVER'
247                 The Galaxy API server URL
248
249       collection list
250              List installed collections or roles
251
252              --format 'OUTPUT_FORMAT'
253                 Format to display the list of collections in.
254
255              --timeout 'TIMEOUT'
256                 The time to wait for operations against  the  galaxy  server,
257                 defaults to 60s.
258
259              --token 'API_KEY',   --api-key 'API_KEY'
260                 The   Ansible   Galaxy   API   key  which  can  be  found  at
261                 https://galaxy.ansible.com/me/preferences.
262
263              -c,   --ignore-certs
264                 Ignore SSL certificate validation errors.
265
266              -p,   --collections-path
267                 One or more directories to search for collections in addition
268                 to  the  default  COLLECTIONS_PATHS.  Separate multiple paths
269                 with ':'.
270
271              -s 'API_SERVER',   --server 'API_SERVER'
272                 The Galaxy API server URL
273
274       collection verify
275              Compare checksums with the collection(s) found on the server and
276              the installed copy. This does not verify dependencies.
277
278              --ignore-signature-status-code
279                 A  status  code  to ignore during signature verification (for
280                 example, NO_PUBKEY). Provide this option  multiple  times  to
281                 ignore  a  list of status codes. Descriptions for the choices
282                 can           be            seen            at            L(‐
283                 https://github.com/gpg/gnupg/blob/master/doc/DETAILS#gen‐
284                 eral-status-codes).
285
286              --keyring 'KEYRING'
287                 The keyring used during signature verification
288
289              --offline
290                 Validate  collection  integrity  locally  without  contacting
291                 server for canonical manifest hash.
292
293              --required-valid-signature-count          'REQUIRED_VALID_SIGNA‐
294              TURE_COUNT'
295                 The number of signatures that must  successfully  verify  the
296                 collection.  This should be a positive integer or all to sig‐
297                 nify that all signatures must be used to verify  the  collec‐
298                 tion. Prepend the value with + to fail if no valid signatures
299                 are found for the collection (e.g. +all).
300
301              --signature
302                 An additional signature source to verify the authenticity  of
303                 the  MANIFEST.json  before using it to verify the rest of the
304                 contents of a collection from a Galaxy server.  Use  in  con‐
305                 junction  with  a positional collection name (mutually exclu‐
306                 sive with --requirements-file).
307
308              --timeout 'TIMEOUT'
309                 The time to wait for operations against  the  galaxy  server,
310                 defaults to 60s.
311
312              --token 'API_KEY',   --api-key 'API_KEY'
313                 The   Ansible   Galaxy   API   key  which  can  be  found  at
314                 https://galaxy.ansible.com/me/preferences.
315
316              -c,   --ignore-certs
317                 Ignore SSL certificate validation errors.
318
319              -i,   --ignore-errors
320                 Ignore errors during verification and continue with the  next
321                 specified collection.
322
323              -p,   --collections-path
324                 One or more directories to search for collections in addition
325                 to the default  COLLECTIONS_PATHS.  Separate  multiple  paths
326                 with ':'.
327
328              -r 'REQUIREMENTS',   --requirements-file 'REQUIREMENTS'
329                 A file containing a list of collections to be verified.
330
331              -s 'API_SERVER',   --server 'API_SERVER'
332                 The Galaxy API server URL
333
334       role   Perform  the  action on an Ansible Galaxy role. Must be combined
335              with a further action like delete/install/init as listed below.
336
337       role init
338              Creates the skeleton framework of a role or collection that com‐
339              plies  with  the Galaxy metadata format. Requires a role or col‐
340              lection name. The collection name must be in the  format  <name‐
341              space>.<collection>.
342
343              --init-path 'INIT_PATH'
344                 The  path in which the skeleton role will be created. The de‐
345                 fault is the current working directory.
346
347              --offline
348                 Don't query the galaxy API when creating roles
349
350              --role-skeleton 'ROLE_SKELETON'
351                 The path to a role skeleton that the new role should be based
352                 upon.
353
354              --timeout 'TIMEOUT'
355                 The  time  to  wait for operations against the galaxy server,
356                 defaults to 60s.
357
358              --token 'API_KEY',   --api-key 'API_KEY'
359                 The  Ansible  Galaxy  API  key  which   can   be   found   at
360                 https://galaxy.ansible.com/me/preferences.
361
362              --type 'ROLE_TYPE'
363                 Initialize using an alternate role type. Valid types include:
364                 'container', 'apb' and 'network'.
365
366              -c,   --ignore-certs
367                 Ignore SSL certificate validation errors.
368
369              -f,   --force
370                 Force overwriting an existing role or collection
371
372              -s 'API_SERVER',   --server 'API_SERVER'
373                 The Galaxy API server URL
374
375       role remove
376              removes the list of roles passed as  arguments  from  the  local
377              system.
378
379              --timeout 'TIMEOUT'
380                 The  time  to  wait for operations against the galaxy server,
381                 defaults to 60s.
382
383              --token 'API_KEY',   --api-key 'API_KEY'
384                 The  Ansible  Galaxy  API  key  which   can   be   found   at
385                 https://galaxy.ansible.com/me/preferences.
386
387              -c,   --ignore-certs
388                 Ignore SSL certificate validation errors.
389
390              -p,   --roles-path
391                 The  path to the directory containing your roles. The default
392                 is the first writable one configured via  DEFAULT_ROLES_PATH:
393                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
394                 ble/roles" }}
395
396              -s 'API_SERVER',   --server 'API_SERVER'
397                 The Galaxy API server URL
398
399       role delete
400              Delete a role from Ansible Galaxy.
401
402              --timeout 'TIMEOUT'
403                 The time to wait for operations against  the  galaxy  server,
404                 defaults to 60s.
405
406              --token 'API_KEY',   --api-key 'API_KEY'
407                 The   Ansible   Galaxy   API   key  which  can  be  found  at
408                 https://galaxy.ansible.com/me/preferences.
409
410              -c,   --ignore-certs
411                 Ignore SSL certificate validation errors.
412
413              -s 'API_SERVER',   --server 'API_SERVER'
414                 The Galaxy API server URL
415
416       role list
417              List installed collections or roles
418
419              --timeout 'TIMEOUT'
420                 The time to wait for operations against  the  galaxy  server,
421                 defaults to 60s.
422
423              --token 'API_KEY',   --api-key 'API_KEY'
424                 The   Ansible   Galaxy   API   key  which  can  be  found  at
425                 https://galaxy.ansible.com/me/preferences.
426
427              -c,   --ignore-certs
428                 Ignore SSL certificate validation errors.
429
430              -p,   --roles-path
431                 The path to the directory containing your roles. The  default
432                 is  the first writable one configured via DEFAULT_ROLES_PATH:
433                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
434                 ble/roles" }}
435
436              -s 'API_SERVER',   --server 'API_SERVER'
437                 The Galaxy API server URL
438
439       role search
440              searches for roles on the Ansible Galaxy server
441
442              --author 'AUTHOR'
443                 GitHub username
444
445              --galaxy-tags 'GALAXY_TAGS'
446                 list of galaxy tags to filter by
447
448              --platforms 'PLATFORMS'
449                 list of OS platforms to filter by
450
451              --timeout 'TIMEOUT'
452                 The  time  to  wait for operations against the galaxy server,
453                 defaults to 60s.
454
455              --token 'API_KEY',   --api-key 'API_KEY'
456                 The  Ansible  Galaxy  API  key  which   can   be   found   at
457                 https://galaxy.ansible.com/me/preferences.
458
459              -c,   --ignore-certs
460                 Ignore SSL certificate validation errors.
461
462              -s 'API_SERVER',   --server 'API_SERVER'
463                 The Galaxy API server URL
464
465       role import
466              used to import a role into Ansible Galaxy
467
468              --branch 'REFERENCE'
469                 The  name of a branch to import. Defaults to the repository's
470                 default branch (usually master)
471
472              --no-wait
473                 Don't wait for import results.
474
475              --role-name 'ROLE_NAME'
476                 The name the role should have, if  different  than  the  repo
477                 name
478
479              --status
480                 Check  the status of the most recent import request for given
481                 github_user/github_repo.
482
483              --timeout 'TIMEOUT'
484                 The time to wait for operations against  the  galaxy  server,
485                 defaults to 60s.
486
487              --token 'API_KEY',   --api-key 'API_KEY'
488                 The   Ansible   Galaxy   API   key  which  can  be  found  at
489                 https://galaxy.ansible.com/me/preferences.
490
491              -c,   --ignore-certs
492                 Ignore SSL certificate validation errors.
493
494              -s 'API_SERVER',   --server 'API_SERVER'
495                 The Galaxy API server URL
496
497       role setup
498              Setup an integration from Github or Travis  for  Ansible  Galaxy
499              roles
500
501              --list
502                 List all of your integrations.
503
504              --remove 'REMOVE_ID'
505                 Remove  the  integration  matching the provided ID value. Use
506                 --list to see ID values.
507
508              --timeout 'TIMEOUT'
509                 The time to wait for operations against  the  galaxy  server,
510                 defaults to 60s.
511
512              --token 'API_KEY',   --api-key 'API_KEY'
513                 The   Ansible   Galaxy   API   key  which  can  be  found  at
514                 https://galaxy.ansible.com/me/preferences.
515
516              -c,   --ignore-certs
517                 Ignore SSL certificate validation errors.
518
519              -p,   --roles-path
520                 The path to the directory containing your roles. The  default
521                 is  the first writable one configured via DEFAULT_ROLES_PATH:
522                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
523                 ble/roles" }}
524
525              -s 'API_SERVER',   --server 'API_SERVER'
526                 The Galaxy API server URL
527
528       role info
529              prints  out detailed information about an installed role as well
530              as info available from the galaxy API.
531
532              --offline
533                 Don't query the galaxy API when creating roles
534
535              --timeout 'TIMEOUT'
536                 The time to wait for operations against  the  galaxy  server,
537                 defaults to 60s.
538
539              --token 'API_KEY',   --api-key 'API_KEY'
540                 The   Ansible   Galaxy   API   key  which  can  be  found  at
541                 https://galaxy.ansible.com/me/preferences.
542
543              -c,   --ignore-certs
544                 Ignore SSL certificate validation errors.
545
546              -p,   --roles-path
547                 The path to the directory containing your roles. The  default
548                 is  the first writable one configured via DEFAULT_ROLES_PATH:
549                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
550                 ble/roles" }}
551
552              -s 'API_SERVER',   --server 'API_SERVER'
553                 The Galaxy API server URL
554
555       role install
556              Install  one  or more roles(ansible-galaxy role install), or one
557              or more collections(ansible-galaxy collection install). You  can
558              pass  in  a  list  (roles or collections) or use the file option
559              listed below (these are mutually exclusive). If you  pass  in  a
560              list,  it can be a name (which will be downloaded via the galaxy
561              API and github), or it can be a local tar archive file.
562
563              --force-with-deps
564                 Force overwriting an existing role and its dependencies.
565
566              --timeout 'TIMEOUT'
567                 The time to wait for operations against  the  galaxy  server,
568                 defaults to 60s.
569
570              --token 'API_KEY',   --api-key 'API_KEY'
571                 The   Ansible   Galaxy   API   key  which  can  be  found  at
572                 https://galaxy.ansible.com/me/preferences.
573
574              -c,   --ignore-certs
575                 Ignore SSL certificate validation errors.
576
577              -f,   --force
578                 Force overwriting an existing role or collection
579
580              -g,   --keep-scm-meta
581                 Use tar instead of the scm archive option when packaging  the
582                 role.
583
584              -i,   --ignore-errors
585                 Ignore errors and continue with the next specified role.
586
587              -n,   --no-deps
588                 Don't download roles listed as dependencies.
589
590              -p,   --roles-path
591                 The  path to the directory containing your roles. The default
592                 is the first writable one configured via  DEFAULT_ROLES_PATH:
593                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
594                 ble/roles" }}
595
596              -r 'REQUIREMENTS',   --role-file 'REQUIREMENTS'
597                 A file containing a list of roles to be installed.
598
599              -s 'API_SERVER',   --server 'API_SERVER'
600                 The Galaxy API server URL
601

ENVIRONMENT

603       The following environment variables may be specified.
604
605       ANSIBLE_CONFIG -- Specify override location for the ansible config file
606
607       Many more are available for most options in ansible.cfg
608
609       For a full list  check  https://docs.ansible.com/.  or  use  the  ansi‐
610       ble-config command.
611

FILES

613       /etc/ansible/ansible.cfg -- Config file, used if present
614
615       ~/.ansible.cfg  --  User  config  file, overrides the default config if
616       present
617
618       ./ansible.cfg -- Local config file (in current working  directory)  as‐
619       sumed to be 'project specific' and overrides the rest if present.
620
621       As  mentioned above, the ANSIBLE_CONFIG environment variable will over‐
622       ride all others.
623

AUTHOR

625       Ansible was originally written by Michael DeHaan.
626
628       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
629       terms of the GPLv3 license.
630

SEE ALSO

632       ansible  (1), ansible-config (1), ansible-console (1), ansible-doc (1),
633       ansible-inventory (1), ansible-playbook (1),  ansible-pull  (1),  ansi‐
634       ble-vault (1)
635
636       Extensive  documentation  is  available  in  the documentation site: <‐
637       https://docs.ansible.com>.  IRC and mailing list info can be  found  in
638       file          CONTRIBUTING.md,         available         in:         <‐
639       https://github.com/ansible/ansible>
640
641
642
643
644Ansible 2.14.11                                              ANSIBLE-GALAXY(1)
Impressum