Update developing_collections_distributing.rst (#74820)

It is not clear that you can publish without configuring an ansible.cfg.  The `--token` can be displayed with the `ansible-galaxy collection publish -h`
This commit is contained in:
Sean Cavanaugh 2021-05-25 13:19:05 -04:00 committed by GitHub
parent b6de1984db
commit 88d67b00f8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,6 +216,16 @@ To upload the collection artifact with the ``ansible-galaxy`` command:
The ``ansible-galaxy collection publish`` command triggers an import process, just as if you uploaded the collection through the Galaxy website. The command waits until the import process completes before reporting the status back. If you want to continue without waiting for the import result, use the ``--no-wait`` argument and manually look at the import progress in your `My Imports <https://galaxy.ansible.com/my-imports/>`_ page.
Alternately, you can publish to Galaxy without configuring the token in :file:`ansible.cfg`. Use the ``--token`` argument directly on the command line.
.. code-block:: bash
ansible-galaxy collection publish path/to/my_namespace-my_collection-1.0.0.tar.gz --token abcdefghijklmnopqrtuvwxyz
.. note::
Using the ``--token`` argument is not recommended because passing secrets on the command line may lead to exposing them to others on the system
.. _upload_collection_galaxy: