summaryrefslogtreecommitdiff
path: root/docs/docsite/rst/dev_guide/developing_collections_structure.rst
diff options
context:
space:
mode:
authorDesmond Obisi <51109125+DesmondSanctity@users.noreply.github.com>2022-05-06 16:30:42 +0100
committerGitHub <noreply@github.com>2022-05-06 11:30:42 -0400
commit42086c14a36ccf3eb16b10350852ba1ffc2ed6d1 (patch)
tree67af2ca855e74ca4e1e14d0e33e4caff224ec7a6 /docs/docsite/rst/dev_guide/developing_collections_structure.rst
parent18fe5a88352a460dcc4fbe49a478552c80a0f101 (diff)
downloadansible-42086c14a36ccf3eb16b10350852ba1ffc2ed6d1.tar.gz
Updated the playbook section in this docs (#77747)
Diffstat (limited to 'docs/docsite/rst/dev_guide/developing_collections_structure.rst')
-rw-r--r--docs/docsite/rst/dev_guide/developing_collections_structure.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/docsite/rst/dev_guide/developing_collections_structure.rst b/docs/docsite/rst/dev_guide/developing_collections_structure.rst
index 585087a4c8..51f65685c5 100644
--- a/docs/docsite/rst/dev_guide/developing_collections_structure.rst
+++ b/docs/docsite/rst/dev_guide/developing_collections_structure.rst
@@ -185,6 +185,13 @@ This will keep the playbook in 'collection context', as if you had added ``colle
You can have most of the subdirectories you would expect, such ``files/``, ``vars/`` or ``templates/`` but no ``roles/`` since those are handled already in the collection.
+Also, playbooks within a collection follow the same guidelines as any playbooks except for these few adjustments:
+
+ - Directory: It must be in ``/playbooks directory``.
+ - Hosts: The host should be defined as a variable so the users of a playbook do not mistakenly run the plays against their entire inventory (if the host is set to all). For example - ``hosts: '{{target|default("all")}}'``.
+
+To run the plays, users can now use such commands as ``ansible-playbook --e 'targets=webservers'`` or ``ansible-playbook --limit webservers``. Either way, the collection owner should document their playbooks and how to use them in the ``/docs`` folder or ``README`` file.
+
.. _developing_collections_tests_directory:
tests directory