From 88d67b00f84f527d13318a61ce044f7282d2a6c9 Mon Sep 17 00:00:00 2001 From: Sean Cavanaugh Date: Tue, 25 May 2021 13:19:05 -0400 Subject: [PATCH] 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` --- .../dev_guide/developing_collections_distributing.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/docsite/rst/dev_guide/developing_collections_distributing.rst b/docs/docsite/rst/dev_guide/developing_collections_distributing.rst index e31d53368aa..ba26b6d7a64 100644 --- a/docs/docsite/rst/dev_guide/developing_collections_distributing.rst +++ b/docs/docsite/rst/dev_guide/developing_collections_distributing.rst @@ -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 `_ 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: