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. This argument may be specified multiple times.
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                 ==SUPPRESS==. This argument may be specified multiple times.
179
180              --ignore-signature-status-codes
181                 A  space separated list of status codes to ignore during sig‐
182                 nature verification (for  example,  NO_PUBKEY  FAILURE).  De‐
183                 scriptions   for   the   choices   can   be   seen   at   L(‐
184                 https://github.com/gpg/gnupg/blob/master/doc/DETAILS#gen‐
185                 eral-status-codes).Note: specify these after positional argu‐
186                 ments or use -- to separate them. This argument may be speci‐
187                 fied multiple times.
188
189              --keyring 'KEYRING'
190                 The keyring used during signature verification
191
192              --no-cache
193                 Do not use the server response cache.
194
195              --offline
196                 Install  collection  artifacts  (tarballs) without contacting
197                 any distribution servers. This does not apply to  collections
198                 in remote Git repositories or URLs to remote tarballs.
199
200              --pre
201                 Include  pre-release  versions.  Semantic  versioning pre-re‐
202                 leases are ignored by default
203
204              --required-valid-signature-count          'REQUIRED_VALID_SIGNA‐
205              TURE_COUNT'
206                 The  number  of  signatures that must successfully verify the
207                 collection. This should be a positive integer or -1  to  sig‐
208                 nify  that  all signatures must be used to verify the collec‐
209                 tion. Prepend the value with + to fail if no valid signatures
210                 are found for the collection (e.g. +all).
211
212              --signature
213                 An  additional signature source to verify the authenticity of
214                 the MANIFEST.json before installing  the  collection  from  a
215                 Galaxy  server.  Use in conjunction with a positional collec‐
216                 tion name (mutually exclusive with --requirements-file). This
217                 argument may be specified multiple times.
218
219              --timeout 'TIMEOUT'
220                 The  time  to  wait for operations against the galaxy server,
221                 defaults to 60s.
222
223              --token 'API_KEY',   --api-key 'API_KEY'
224                 The  Ansible  Galaxy  API  key  which   can   be   found   at
225                 https://galaxy.ansible.com/me/preferences.
226
227              -U,   --upgrade
228                 Upgrade installed collection artifacts. This will also update
229                 dependencies unless --no-deps is provided
230
231              -c,   --ignore-certs
232                 Ignore SSL certificate validation errors.
233
234              -f,   --force
235                 Force overwriting an existing role or collection
236
237              -i,   --ignore-errors
238                 Ignore errors during installation and continue with the  next
239                 specified  collection.  This  will not ignore dependency con‐
240                 flict errors.
241
242              -n,   --no-deps
243                 Don't download collections listed as dependencies.
244
245              -p 'COLLECTIONS_PATH',   --collections-path 'COLLECTIONS_PATH'
246                 The path to the directory containing your collections.
247
248              -r 'REQUIREMENTS',   --requirements-file 'REQUIREMENTS'
249                 A file containing a list of collections to be installed.
250
251              -s 'API_SERVER',   --server 'API_SERVER'
252                 The Galaxy API server URL
253
254       collection list
255              List installed collections or roles
256
257              --format 'OUTPUT_FORMAT'
258                 Format to display the list of collections in.
259
260              --timeout 'TIMEOUT'
261                 The time to wait for operations against  the  galaxy  server,
262                 defaults to 60s.
263
264              --token 'API_KEY',   --api-key 'API_KEY'
265                 The   Ansible   Galaxy   API   key  which  can  be  found  at
266                 https://galaxy.ansible.com/me/preferences.
267
268              -c,   --ignore-certs
269                 Ignore SSL certificate validation errors.
270
271              -p,   --collections-path
272                 One or more directories to search for collections in addition
273                 to  the  default  COLLECTIONS_PATHS.  Separate multiple paths
274                 with ':'. This argument may be specified multiple times.
275
276              -s 'API_SERVER',   --server 'API_SERVER'
277                 The Galaxy API server URL
278
279       collection verify
280              Compare checksums with the collection(s) found on the server and
281              the installed copy. This does not verify dependencies.
282
283              --ignore-signature-status-code
284                 ==SUPPRESS==. This argument may be specified multiple times.
285
286              --ignore-signature-status-codes
287                 A  space separated list of status codes to ignore during sig‐
288                 nature verification (for  example,  NO_PUBKEY  FAILURE).  De‐
289                 scriptions   for   the   choices   can   be   seen   at   L(‐
290                 https://github.com/gpg/gnupg/blob/master/doc/DETAILS#gen‐
291                 eral-status-codes).Note: specify these after positional argu‐
292                 ments or use -- to separate them. This argument may be speci‐
293                 fied multiple times.
294
295              --keyring 'KEYRING'
296                 The keyring used during signature verification
297
298              --offline
299                 Validate  collection  integrity  locally  without  contacting
300                 server for canonical manifest hash.
301
302              --required-valid-signature-count          'REQUIRED_VALID_SIGNA‐
303              TURE_COUNT'
304                 The  number  of  signatures that must successfully verify the
305                 collection. This should be a positive integer or all to  sig‐
306                 nify  that  all signatures must be used to verify the collec‐
307                 tion. Prepend the value with + to fail if no valid signatures
308                 are found for the collection (e.g. +all).
309
310              --signature
311                 An  additional signature source to verify the authenticity of
312                 the MANIFEST.json before using it to verify the rest  of  the
313                 contents  of  a  collection from a Galaxy server. Use in con‐
314                 junction with a positional collection name  (mutually  exclu‐
315                 sive  with  --requirements-file). This argument may be speci‐
316                 fied multiple times.
317
318              --timeout 'TIMEOUT'
319                 The time to wait for operations against  the  galaxy  server,
320                 defaults to 60s.
321
322              --token 'API_KEY',   --api-key 'API_KEY'
323                 The   Ansible   Galaxy   API   key  which  can  be  found  at
324                 https://galaxy.ansible.com/me/preferences.
325
326              -c,   --ignore-certs
327                 Ignore SSL certificate validation errors.
328
329              -i,   --ignore-errors
330                 Ignore errors during verification and continue with the  next
331                 specified collection.
332
333              -p,   --collections-path
334                 One or more directories to search for collections in addition
335                 to the default  COLLECTIONS_PATHS.  Separate  multiple  paths
336                 with ':'. This argument may be specified multiple times.
337
338              -r 'REQUIREMENTS',   --requirements-file 'REQUIREMENTS'
339                 A file containing a list of collections to be verified.
340
341              -s 'API_SERVER',   --server 'API_SERVER'
342                 The Galaxy API server URL
343
344       role   Perform  the  action on an Ansible Galaxy role. Must be combined
345              with a further action like delete/install/init as listed below.
346
347       role init
348              Creates the skeleton framework of a role or collection that com‐
349              plies  with  the Galaxy metadata format. Requires a role or col‐
350              lection name. The collection name must be in the  format  <name‐
351              space>.<collection>.
352
353              --init-path 'INIT_PATH'
354                 The  path in which the skeleton role will be created. The de‐
355                 fault is the current working directory.
356
357              --offline
358                 Don't query the galaxy API when creating roles
359
360              --role-skeleton 'ROLE_SKELETON'
361                 The path to a role skeleton that the new role should be based
362                 upon.
363
364              --timeout 'TIMEOUT'
365                 The  time  to  wait for operations against the galaxy server,
366                 defaults to 60s.
367
368              --token 'API_KEY',   --api-key 'API_KEY'
369                 The  Ansible  Galaxy  API  key  which   can   be   found   at
370                 https://galaxy.ansible.com/me/preferences.
371
372              --type 'ROLE_TYPE'
373                 Initialize using an alternate role type. Valid types include:
374                 'container', 'apb' and 'network'.
375
376              -c,   --ignore-certs
377                 Ignore SSL certificate validation errors.
378
379              -f,   --force
380                 Force overwriting an existing role or collection
381
382              -s 'API_SERVER',   --server 'API_SERVER'
383                 The Galaxy API server URL
384
385       role remove
386              removes the list of roles passed as  arguments  from  the  local
387              system.
388
389              --timeout 'TIMEOUT'
390                 The  time  to  wait for operations against the galaxy server,
391                 defaults to 60s.
392
393              --token 'API_KEY',   --api-key 'API_KEY'
394                 The  Ansible  Galaxy  API  key  which   can   be   found   at
395                 https://galaxy.ansible.com/me/preferences.
396
397              -c,   --ignore-certs
398                 Ignore SSL certificate validation errors.
399
400              -p,   --roles-path
401                 The  path to the directory containing your roles. The default
402                 is the first writable one configured via  DEFAULT_ROLES_PATH:
403                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
404                 ble/roles" }} .  This  argument  may  be  specified  multiple
405                 times.
406
407              -s 'API_SERVER',   --server 'API_SERVER'
408                 The Galaxy API server URL
409
410       role delete
411              Delete a role from Ansible Galaxy.
412
413              --timeout 'TIMEOUT'
414                 The  time  to  wait for operations against the galaxy server,
415                 defaults to 60s.
416
417              --token 'API_KEY',   --api-key 'API_KEY'
418                 The  Ansible  Galaxy  API  key  which   can   be   found   at
419                 https://galaxy.ansible.com/me/preferences.
420
421              -c,   --ignore-certs
422                 Ignore SSL certificate validation errors.
423
424              -s 'API_SERVER',   --server 'API_SERVER'
425                 The Galaxy API server URL
426
427       role list
428              List installed collections or roles
429
430              --timeout 'TIMEOUT'
431                 The  time  to  wait for operations against the galaxy server,
432                 defaults to 60s.
433
434              --token 'API_KEY',   --api-key 'API_KEY'
435                 The  Ansible  Galaxy  API  key  which   can   be   found   at
436                 https://galaxy.ansible.com/me/preferences.
437
438              -c,   --ignore-certs
439                 Ignore SSL certificate validation errors.
440
441              -p,   --roles-path
442                 The  path to the directory containing your roles. The default
443                 is the first writable one configured via  DEFAULT_ROLES_PATH:
444                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
445                 ble/roles" }} .  This  argument  may  be  specified  multiple
446                 times.
447
448              -s 'API_SERVER',   --server 'API_SERVER'
449                 The Galaxy API server URL
450
451       role search
452              searches for roles on the Ansible Galaxy server
453
454              --author 'AUTHOR'
455                 GitHub username
456
457              --galaxy-tags 'GALAXY_TAGS'
458                 list of galaxy tags to filter by
459
460              --platforms 'PLATFORMS'
461                 list of OS platforms to filter by
462
463              --timeout 'TIMEOUT'
464                 The  time  to  wait for operations against the galaxy server,
465                 defaults to 60s.
466
467              --token 'API_KEY',   --api-key 'API_KEY'
468                 The  Ansible  Galaxy  API  key  which   can   be   found   at
469                 https://galaxy.ansible.com/me/preferences.
470
471              -c,   --ignore-certs
472                 Ignore SSL certificate validation errors.
473
474              -s 'API_SERVER',   --server 'API_SERVER'
475                 The Galaxy API server URL
476
477       role import
478              used to import a role into Ansible Galaxy
479
480              --branch 'REFERENCE'
481                 The  name of a branch to import. Defaults to the repository's
482                 default branch (usually master)
483
484              --no-wait
485                 Don't wait for import results.
486
487              --role-name 'ROLE_NAME'
488                 The name the role should have, if  different  than  the  repo
489                 name
490
491              --status
492                 Check  the status of the most recent import request for given
493                 github_user/github_repo.
494
495              --timeout 'TIMEOUT'
496                 The time to wait for operations against  the  galaxy  server,
497                 defaults to 60s.
498
499              --token 'API_KEY',   --api-key 'API_KEY'
500                 The   Ansible   Galaxy   API   key  which  can  be  found  at
501                 https://galaxy.ansible.com/me/preferences.
502
503              -c,   --ignore-certs
504                 Ignore SSL certificate validation errors.
505
506              -s 'API_SERVER',   --server 'API_SERVER'
507                 The Galaxy API server URL
508
509       role setup
510              Setup an integration from Github or Travis  for  Ansible  Galaxy
511              roles
512
513              --list
514                 List all of your integrations.
515
516              --remove 'REMOVE_ID'
517                 Remove  the  integration  matching the provided ID value. Use
518                 --list to see ID values.
519
520              --timeout 'TIMEOUT'
521                 The time to wait for operations against  the  galaxy  server,
522                 defaults to 60s.
523
524              --token 'API_KEY',   --api-key 'API_KEY'
525                 The   Ansible   Galaxy   API   key  which  can  be  found  at
526                 https://galaxy.ansible.com/me/preferences.
527
528              -c,   --ignore-certs
529                 Ignore SSL certificate validation errors.
530
531              -p,   --roles-path
532                 The path to the directory containing your roles. The  default
533                 is  the first writable one configured via DEFAULT_ROLES_PATH:
534                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
535                 ble/roles"  }}  .  This  argument  may  be specified multiple
536                 times.
537
538              -s 'API_SERVER',   --server 'API_SERVER'
539                 The Galaxy API server URL
540
541       role info
542              prints out detailed information about an installed role as  well
543              as info available from the galaxy API.
544
545              --offline
546                 Don't query the galaxy API when creating roles
547
548              --timeout 'TIMEOUT'
549                 The  time  to  wait for operations against the galaxy server,
550                 defaults to 60s.
551
552              --token 'API_KEY',   --api-key 'API_KEY'
553                 The  Ansible  Galaxy  API  key  which   can   be   found   at
554                 https://galaxy.ansible.com/me/preferences.
555
556              -c,   --ignore-certs
557                 Ignore SSL certificate validation errors.
558
559              -p,   --roles-path
560                 The  path to the directory containing your roles. The default
561                 is the first writable one configured via  DEFAULT_ROLES_PATH:
562                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
563                 ble/roles" }} .  This  argument  may  be  specified  multiple
564                 times.
565
566              -s 'API_SERVER',   --server 'API_SERVER'
567                 The Galaxy API server URL
568
569       role install
570              Install  one  or more roles(ansible-galaxy role install), or one
571              or more collections(ansible-galaxy collection install). You  can
572              pass  in  a  list  (roles or collections) or use the file option
573              listed below (these are mutually exclusive). If you  pass  in  a
574              list,  it can be a name (which will be downloaded via the galaxy
575              API and github), or it can be a local tar archive file.
576
577              --force-with-deps
578                 Force overwriting an existing role and its dependencies.
579
580              --timeout 'TIMEOUT'
581                 The time to wait for operations against  the  galaxy  server,
582                 defaults to 60s.
583
584              --token 'API_KEY',   --api-key 'API_KEY'
585                 The   Ansible   Galaxy   API   key  which  can  be  found  at
586                 https://galaxy.ansible.com/me/preferences.
587
588              -c,   --ignore-certs
589                 Ignore SSL certificate validation errors.
590
591              -f,   --force
592                 Force overwriting an existing role or collection
593
594              -g,   --keep-scm-meta
595                 Use tar instead of the scm archive option when packaging  the
596                 role.
597
598              -i,   --ignore-errors
599                 Ignore errors and continue with the next specified role.
600
601              -n,   --no-deps
602                 Don't download roles listed as dependencies.
603
604              -p,   --roles-path
605                 The  path to the directory containing your roles. The default
606                 is the first writable one configured via  DEFAULT_ROLES_PATH:
607                 {{ ANSIBLE_HOME ~ "/roles:/usr/share/ansible/roles:/etc/ansi‐
608                 ble/roles" }} .  This  argument  may  be  specified  multiple
609                 times.
610
611              -r 'REQUIREMENTS',   --role-file 'REQUIREMENTS'
612                 A file containing a list of roles to be installed.
613
614              -s 'API_SERVER',   --server 'API_SERVER'
615                 The Galaxy API server URL
616

ENVIRONMENT

618       The following environment variables may be specified.
619
620       ANSIBLE_CONFIG -- Specify override location for the ansible config file
621
622       Many more are available for most options in ansible.cfg
623
624       For  a  full  list  check  https://docs.ansible.com/.  or use the ansi‐
625       ble-config command.
626

FILES

628       /etc/ansible/ansible.cfg -- Config file, used if present
629
630       ~/.ansible.cfg -- User config file, overrides  the  default  config  if
631       present
632
633       ./ansible.cfg  --  Local config file (in current working directory) as‐
634       sumed to be 'project specific' and overrides the rest if present.
635
636       As mentioned above, the ANSIBLE_CONFIG environment variable will  over‐
637       ride all others.
638

AUTHOR

640       Ansible was originally written by Michael DeHaan.
641
643       Copyright © 2018 Red Hat, Inc | Ansible.  Ansible is released under the
644       terms of the GPLv3 license.
645

SEE ALSO

647       ansible (1), ansible-config (1), ansible-console (1), ansible-doc  (1),
648       ansible-inventory  (1),  ansible-playbook  (1), ansible-pull (1), ansi‐
649       ble-vault (1)
650
651       Extensive documentation is available  in  the  documentation  site:  <‐
652       https://docs.ansible.com>.   IRC  and mailing list info can be found in
653       file         CONTRIBUTING.md,         available         in:          <‐
654       https://github.com/ansible/ansible>
655
656
657
658
659Ansible 2.16.0                                               ANSIBLE-GALAXY(1)
Impressum