You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/docs/docsite/rst/dev_guide/developing_collections.rst

386 lines
16 KiB
ReStructuredText

Backport/2.9/docs2 (#62805) * Update pip module docs (#62359) * Clarifying pip module requirements in reference to #47361 * Further clarifying message with link to ansible_python_interpreter (cherry picked from commit d3ec5ca80f630ed8c78ea3fab73e0d2927a89b5e) * chore/doc-module: sts_assume_role.py (#62475) Update `Example` section with with the correct module usage. (cherry picked from commit a4a216640fc7efe436f3f09808500b52ff6a63cd) * Improve dconf documentation to include conversion problems (#62316) (cherry picked from commit 864928365ef000c187871e6874b520f0bd2bc97c) * Add examples for various inventory setups to the documentation (#62323) * Updates docs/docsite/rst/user_guide/intro_inventory.rst, closes #12480. * Use code-block and rename groups in inventory setup examples * Fix group name in inventory setup example Co-Authored-By: Sandra McCann <samccann@redhat.com> (cherry picked from commit 7047b66d345fc98c9ed163bbd47f3ee7c092f55b) * added networking porting guide info (#61999) * Update docs/docsite/rst/porting_guides/porting_guide_2.9.rst Co-Authored-By: Nathaniel Case <this.is@nathanielca.se> (cherry picked from commit 6d35f9026f521b3191a0ad5e5abbdeb1c46ec29e) * [docs] split collections into user and dev guide sections (#62363) (cherry picked from commit 7badeb6df0e644419adf2b5daf9545d448defe60) * fixed options (#62605) (cherry picked from commit 170b4e63ffa6115275cb78ebc0f68f8aa79f99a3) * ec2_vpc_subnet: Rename resource_tags > tags (#62663) Most of the AWS module documentation refers to `tags` and not `resource_tags`. This patch updates the documentation to match other AWS module documentation. 😉 Signed-off-by: Major Hayden <major@redhat.com> (cherry picked from commit cced1a3cd1e696cf5927ed248215d442dd6c1244) * [Docs] Document the resource module builder (#62222) (cherry picked from commit b17581a3075f571ed5b48126282e086a6efa30cc) * Fix link syntax and a typo in dev collections doc (#62650) (cherry picked from commit 2969614c2cb89151c3bf2487e0e1a1afe77cde96) * hcloud_volume: clarify volume size units (#62771) (cherry picked from commit 190b8fcd1cc413a8b3a6e5c9f3f74353990400dd) * ovirt_host update force doc (#62491) (cherry picked from commit 3b2b418aadc6ff2da4bae7f3d14ab8a51b207f77) * update example document for zabbix_action module (#62667) (cherry picked from commit 3299f29f7c7c4866baef78e8ae1d5272cd0b265d)
5 years ago
.. _developing_collections:
Backport/2.9/docs2 (#62805) * Update pip module docs (#62359) * Clarifying pip module requirements in reference to #47361 * Further clarifying message with link to ansible_python_interpreter (cherry picked from commit d3ec5ca80f630ed8c78ea3fab73e0d2927a89b5e) * chore/doc-module: sts_assume_role.py (#62475) Update `Example` section with with the correct module usage. (cherry picked from commit a4a216640fc7efe436f3f09808500b52ff6a63cd) * Improve dconf documentation to include conversion problems (#62316) (cherry picked from commit 864928365ef000c187871e6874b520f0bd2bc97c) * Add examples for various inventory setups to the documentation (#62323) * Updates docs/docsite/rst/user_guide/intro_inventory.rst, closes #12480. * Use code-block and rename groups in inventory setup examples * Fix group name in inventory setup example Co-Authored-By: Sandra McCann <samccann@redhat.com> (cherry picked from commit 7047b66d345fc98c9ed163bbd47f3ee7c092f55b) * added networking porting guide info (#61999) * Update docs/docsite/rst/porting_guides/porting_guide_2.9.rst Co-Authored-By: Nathaniel Case <this.is@nathanielca.se> (cherry picked from commit 6d35f9026f521b3191a0ad5e5abbdeb1c46ec29e) * [docs] split collections into user and dev guide sections (#62363) (cherry picked from commit 7badeb6df0e644419adf2b5daf9545d448defe60) * fixed options (#62605) (cherry picked from commit 170b4e63ffa6115275cb78ebc0f68f8aa79f99a3) * ec2_vpc_subnet: Rename resource_tags > tags (#62663) Most of the AWS module documentation refers to `tags` and not `resource_tags`. This patch updates the documentation to match other AWS module documentation. 😉 Signed-off-by: Major Hayden <major@redhat.com> (cherry picked from commit cced1a3cd1e696cf5927ed248215d442dd6c1244) * [Docs] Document the resource module builder (#62222) (cherry picked from commit b17581a3075f571ed5b48126282e086a6efa30cc) * Fix link syntax and a typo in dev collections doc (#62650) (cherry picked from commit 2969614c2cb89151c3bf2487e0e1a1afe77cde96) * hcloud_volume: clarify volume size units (#62771) (cherry picked from commit 190b8fcd1cc413a8b3a6e5c9f3f74353990400dd) * ovirt_host update force doc (#62491) (cherry picked from commit 3b2b418aadc6ff2da4bae7f3d14ab8a51b207f77) * update example document for zabbix_action module (#62667) (cherry picked from commit 3299f29f7c7c4866baef78e8ae1d5272cd0b265d)
5 years ago
**********************
Developing collections
**********************
Backport/2.9/docs2 (#62805) * Update pip module docs (#62359) * Clarifying pip module requirements in reference to #47361 * Further clarifying message with link to ansible_python_interpreter (cherry picked from commit d3ec5ca80f630ed8c78ea3fab73e0d2927a89b5e) * chore/doc-module: sts_assume_role.py (#62475) Update `Example` section with with the correct module usage. (cherry picked from commit a4a216640fc7efe436f3f09808500b52ff6a63cd) * Improve dconf documentation to include conversion problems (#62316) (cherry picked from commit 864928365ef000c187871e6874b520f0bd2bc97c) * Add examples for various inventory setups to the documentation (#62323) * Updates docs/docsite/rst/user_guide/intro_inventory.rst, closes #12480. * Use code-block and rename groups in inventory setup examples * Fix group name in inventory setup example Co-Authored-By: Sandra McCann <samccann@redhat.com> (cherry picked from commit 7047b66d345fc98c9ed163bbd47f3ee7c092f55b) * added networking porting guide info (#61999) * Update docs/docsite/rst/porting_guides/porting_guide_2.9.rst Co-Authored-By: Nathaniel Case <this.is@nathanielca.se> (cherry picked from commit 6d35f9026f521b3191a0ad5e5abbdeb1c46ec29e) * [docs] split collections into user and dev guide sections (#62363) (cherry picked from commit 7badeb6df0e644419adf2b5daf9545d448defe60) * fixed options (#62605) (cherry picked from commit 170b4e63ffa6115275cb78ebc0f68f8aa79f99a3) * ec2_vpc_subnet: Rename resource_tags > tags (#62663) Most of the AWS module documentation refers to `tags` and not `resource_tags`. This patch updates the documentation to match other AWS module documentation. 😉 Signed-off-by: Major Hayden <major@redhat.com> (cherry picked from commit cced1a3cd1e696cf5927ed248215d442dd6c1244) * [Docs] Document the resource module builder (#62222) (cherry picked from commit b17581a3075f571ed5b48126282e086a6efa30cc) * Fix link syntax and a typo in dev collections doc (#62650) (cherry picked from commit 2969614c2cb89151c3bf2487e0e1a1afe77cde96) * hcloud_volume: clarify volume size units (#62771) (cherry picked from commit 190b8fcd1cc413a8b3a6e5c9f3f74353990400dd) * ovirt_host update force doc (#62491) (cherry picked from commit 3b2b418aadc6ff2da4bae7f3d14ab8a51b207f77) * update example document for zabbix_action module (#62667) (cherry picked from commit 3299f29f7c7c4866baef78e8ae1d5272cd0b265d)
5 years ago
Collections are a distribution format for Ansible content. You can use collections to package and distribute playbooks, roles, modules, and plugins.
You can publish and use collections through `Ansible Galaxy <https://galaxy.ansible.com>`_.
.. contents::
:local:
:depth: 2
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _collection_structure:
Collection structure
====================
Collections follow a simple data structure. None of the directories are required unless you have specific content that belongs in one of them. A collection does require a ``galaxy.yml`` file at the root level of the collection. This file contains all of the metadata that Galaxy
Backport/2.9/docs2 (#62805) * Update pip module docs (#62359) * Clarifying pip module requirements in reference to #47361 * Further clarifying message with link to ansible_python_interpreter (cherry picked from commit d3ec5ca80f630ed8c78ea3fab73e0d2927a89b5e) * chore/doc-module: sts_assume_role.py (#62475) Update `Example` section with with the correct module usage. (cherry picked from commit a4a216640fc7efe436f3f09808500b52ff6a63cd) * Improve dconf documentation to include conversion problems (#62316) (cherry picked from commit 864928365ef000c187871e6874b520f0bd2bc97c) * Add examples for various inventory setups to the documentation (#62323) * Updates docs/docsite/rst/user_guide/intro_inventory.rst, closes #12480. * Use code-block and rename groups in inventory setup examples * Fix group name in inventory setup example Co-Authored-By: Sandra McCann <samccann@redhat.com> (cherry picked from commit 7047b66d345fc98c9ed163bbd47f3ee7c092f55b) * added networking porting guide info (#61999) * Update docs/docsite/rst/porting_guides/porting_guide_2.9.rst Co-Authored-By: Nathaniel Case <this.is@nathanielca.se> (cherry picked from commit 6d35f9026f521b3191a0ad5e5abbdeb1c46ec29e) * [docs] split collections into user and dev guide sections (#62363) (cherry picked from commit 7badeb6df0e644419adf2b5daf9545d448defe60) * fixed options (#62605) (cherry picked from commit 170b4e63ffa6115275cb78ebc0f68f8aa79f99a3) * ec2_vpc_subnet: Rename resource_tags > tags (#62663) Most of the AWS module documentation refers to `tags` and not `resource_tags`. This patch updates the documentation to match other AWS module documentation. 😉 Signed-off-by: Major Hayden <major@redhat.com> (cherry picked from commit cced1a3cd1e696cf5927ed248215d442dd6c1244) * [Docs] Document the resource module builder (#62222) (cherry picked from commit b17581a3075f571ed5b48126282e086a6efa30cc) * Fix link syntax and a typo in dev collections doc (#62650) (cherry picked from commit 2969614c2cb89151c3bf2487e0e1a1afe77cde96) * hcloud_volume: clarify volume size units (#62771) (cherry picked from commit 190b8fcd1cc413a8b3a6e5c9f3f74353990400dd) * ovirt_host update force doc (#62491) (cherry picked from commit 3b2b418aadc6ff2da4bae7f3d14ab8a51b207f77) * update example document for zabbix_action module (#62667) (cherry picked from commit 3299f29f7c7c4866baef78e8ae1d5272cd0b265d)
5 years ago
and other tools need in order to package, build and publish the collection::
collection/
├── docs/
├── galaxy.yml
├── plugins/
│ ├── modules/
│ │ └── module1.py
│ ├── inventory/
│ └── .../
├── README.md
├── roles/
│ ├── role1/
│ ├── role2/
│ └── .../
├── playbooks/
│ ├── files/
│ ├── vars/
│ ├── templates/
│ └── tasks/
└── tests/
.. note::
* Ansible only accepts ``.yml`` extensions for :file:`galaxy.yml`, and ``.md`` for the :file:`README` file and any files in the :file:`/docs` folder.
* See the `draft collection <https://github.com/bcoca/collection>`_ for an example of a full collection structure.
* Not all directories are currently in use. Those are placeholders for future features.
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _galaxy_yml:
galaxy.yml
----------
A collection must have a ``galaxy.yml`` file that contains the necessary information to build a collection artifact.
See :ref:`collections_galaxy_meta` for details.
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _collections_doc_dir:
docs directory
---------------
Backport/2.9/docs (#64073) * clarify no subfolders and md only for collections /docs folder (#63808) (cherry picked from commit 6a2902c8d55f366bd577436effa2426b04ce65ee) * Fixed example error in windows_winrm user guide (#63922) The example code to configure TLS 1.2 Support using Ansible had an indention error. The register variable 'enable_tls12' was not indented. This caused the subsequent task to fail since the variable was not registered. (cherry picked from commit c562e17659abefce44a5e64fd798e6000b84a6f7) * Fix doc errors in AWS modules (#63851) * Fix register/debug in aws_batch_compute_environment * Fix aws_batch_job_queue doc errors * Fix module naming: `batch_job_queue` > `aws_batch_job_queue` * Fix missing register * Update debug task to use modern YAML format * Fix missing register + debug for lambda_policy * Fix YAML syntax for elb_application_lb_info module (cherry picked from commit e4f16368ed8060dd7a15a0078b4a21fb86d85baf) * Update documentation for package module (#63909) It is not clear from the documentation that list can be used (cherry picked from commit 7f2c367d78c1773e5e908e31196fd07a698db9ee) * [ec2_launch_template] Update description of state param (#63147) Currently, it is not possible to delete specific versions of an ec2 launch template. The module docs incorrectly suggest that there is a `version` param to the module that can be used to do that. This patch aims to correct that error. (cherry picked from commit 7ea72607534ce996c311c17ee4c6aaf83989ae9e) * template: Add a space in example block (#63930) (cherry picked from commit f279715c29530c9148616a5c3fa5af846586cb18) * revisions to docsite README (#63957) (cherry picked from commit 5c962ef859b37ac3a9707a3e1ac88f4b34b78038) * combine galaxy.com install roles details (#63486) (cherry picked from commit ee8a0882054b7f633cd8bc075ffc61b8eb136d4b) * Correct a typo (#64020) (cherry picked from commit 18f4f0549faabefbd0457cde0dd86b0d0fed406b) * Update password.py (#63965) Update the examples of the password lookup plugin to show how multiple options are joined together. (cherry picked from commit 92daec5d0bce5dfbb73fda52910de2a74d59fa7e) * Fix indentation of example (#63789) Remove no_log since module_defaults aren't displayed like set_fact was (cherry picked from commit 1e52782d6ba6e3e2c9d140ec47558c034f0d394f) * add newline to render table correctly (#63769) (cherry picked from commit 1aee11c86026e8493ce9acba30175fadcd6dc70f) * clarified some points on environment keyword usage (#64065) (cherry picked from commit 885ee62b53247bc0985bfb12a39149d7ab9d3f2d)
5 years ago
Put general documentation for the collection here. Keep the specific documentation for plugins and modules embedded as Python docstrings. Use the ``docs`` folder to describe how to use the roles and plugins the collection provides, role requirements, and so on. Use markdown and do not add subfolders.
Use ``ansible-doc`` to view documentation for plugins inside a collection:
.. code-block:: bash
ansible-doc -t lookup my_namespace.my_collection.lookup1
The ``ansible-doc`` command requires the fully qualified collection name (FQCN) to display specific plugin documentation. In this example, ``my_namespace`` is the namespace and ``my_collection`` is the collection name within that namespace.
.. note:: The Ansible collection namespace is defined in the ``galaxy.yml`` file and is not equivalent to the GitHub repository name.
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _collections_plugin_dir:
plugins directory
------------------
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
Add a 'per plugin type' specific subdirectory here, including ``module_utils`` which is usable not only by modules, but by most plugins by using their FQCN. This is a way to distribute modules, lookups, filters, and so on, without having to import a role in every play.
Vars plugins are unsupported in collections. Cache plugins may be used in collections for fact caching, but are not supported for inventory plugins.
module_utils
^^^^^^^^^^^^
When coding with ``module_utils`` in a collection, the Python ``import`` statement needs to take into account the FQCN along with the ``ansible_collections`` convention. The resulting Python import will look like ``from ansible_collections.{namespace}.{collection}.plugins.module_utils.{util} import {something}``
The following example snippets show a Python and PowerShell module using both default Ansible ``module_utils`` and
those provided by a collection. In this example the namespace is ``ansible_example``, the collection is ``community``.
In the Python example the ``module_util`` in question is called ``qradar`` such that the FQCN is
``ansible_example.community.plugins.module_utils.qradar``:
.. code-block:: python
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils._text import to_text
from ansible.module_utils.six.moves.urllib.parse import urlencode, quote_plus
from ansible.module_utils.six.moves.urllib.error import HTTPError
from ansible_collections.ansible_example.community.plugins.module_utils.qradar import QRadarRequest
argspec = dict(
name=dict(required=True, type='str'),
state=dict(choices=['present', 'absent'], required=True),
)
module = AnsibleModule(
argument_spec=argspec,
supports_check_mode=True
)
qradar_request = QRadarRequest(
module,
headers={"Content-Type": "application/json"},
not_rest_data_keys=['state']
)
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
Note that importing something from an ``__init__.py`` file requires using the file name:
.. code-block:: python
from ansible_collections.namespace.collection_name.plugins.callback.__init__ import CustomBaseClass
In the PowerShell example the ``module_util`` in question is called ``hyperv`` such that the FCQN is
``ansible_example.community.plugins.module_utils.hyperv``:
.. code-block:: powershell
#!powershell
#AnsibleRequires -CSharpUtil Ansible.Basic
#AnsibleRequires -PowerShell ansible_collections.ansible_example.community.plugins.module_utils.hyperv
$spec = @{
name = @{ required = $true; type = "str" }
state = @{ required = $true; choices = @("present", "absent") }
}
$module = [Ansible.Basic.AnsibleModule]::Create($args, $spec)
Invoke-HyperVFunction -Name $module.Params.name
$module.ExitJson()
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _collections_roles_dir:
roles directory
----------------
Collection roles are mostly the same as existing roles, but with a couple of limitations:
- Role names are now limited to contain only lowercase alphanumeric characters, plus ``_`` and start with an alpha character.
- Roles in a collection cannot contain plugins any more. Plugins must live in the collection ``plugins`` directory tree. Each plugin is accessible to all roles in the collection.
The directory name of the role is used as the role name. Therefore, the directory name must comply with the
above role name rules.
The collection import into Galaxy will fail if a role name does not comply with these rules.
You can migrate 'traditional roles' into a collection but they must follow the rules above. You man need to rename roles if they don't conform. You will have to move or link any role-based plugins to the collection specific directories.
.. note::
For roles imported into Galaxy directly from a GitHub repository, setting the ``role_name`` value in the role's
metadata overrides the role name used by Galaxy. For collections, that value is ignored. When importing a
collection, Galaxy uses the role directory as the name of the role and ignores the ``role_name`` metadata value.
playbooks directory
--------------------
TBD.
tests directory
----------------
TBD. Expect tests for the collection itself to reside here.
.. _creating_collections:
Creating collections
======================
To create a collection:
#. Initialize a collection with :ref:`ansible-galaxy collection init<creating_collections_skeleton>` to create the skeleton directory structure.
#. Add your content to the collection.
#. Build the collection into a collection artifact with :ref:`ansible-galaxy collection build<building_collections>`.
#. Publish the collection artifact to Galaxy with :ref:`ansible-galaxy collection publish<publishing_collections>`.
A user can then install your collection on their systems.
Currently the ``ansible-galaxy collection`` command implements the following sub commands:
* ``init``: Create a basic collection skeleton based on the default template included with Ansible or your own template.
* ``build``: Create a collection artifact that can be uploaded to Galaxy or your own repository.
* ``publish``: Publish a built collection artifact to Galaxy.
* ``install``: Install one or more collections.
To learn more about the ``ansible-galaxy`` cli tool, see the :ref:`ansible-galaxy` man page.
.. _creating_collections_skeleton:
Creating a collection skeleton
------------------------------
To start a new collection:
.. code-block:: bash
collection_dir#> ansible-galaxy collection init my_namespace.my_collection
Then you can populate the directories with the content you want inside the collection. See
https://github.com/bcoca/collection to get a better idea of what you can place inside a collection.
.. _docfragments_collections:
Using documentation fragments in collections
--------------------------------------------
To include documentation fragments in your collection:
#. Create the documentation fragment: ``plugins/doc_fragments/fragment_name``.
#. Refer to the documentation fragment with its FQCN.
.. code-block:: yaml
extends_documentation_fragment:
- community.kubernetes.k8s_name_options
- community.kubernetes.k8s_auth_options
- community.kubernetes.k8s_resource_options
- community.kubernetes.k8s_scale_options
:ref:`module_docs_fragments` covers the basics for documentation fragments. The `kubernetes <https://github.com/ansible-collections/kubernetes>`_ collection includes a complete example.
You can also share documentation fragments across collections with the FQCN.
.. _building_collections:
Building collections
--------------------
To build a collection, run ``ansible-galaxy collection build`` from inside the root directory of the collection:
.. code-block:: bash
collection_dir#> ansible-galaxy collection build
This creates a tarball of the built collection in the current directory which can be uploaded to Galaxy.::
my_collection/
├── galaxy.yml
├── ...
├── my_namespace-my_collection-1.0.0.tar.gz
└── ...
.. note::
* Certain files and folders are excluded when building the collection artifact. This is not currently configurable and is a work in progress so the collection artifact may contain files you would not wish to distribute.
* If you used the now-deprecated ``Mazer`` tool for any of your collections, delete any and all files it added to your :file:`releases/` directory before you build your collection with ``ansible-galaxy``.
* You must also delete the :file:`tests/output` directory if you have been testing with ``ansible-test``.
* The current Galaxy maximum tarball size is 2 MB.
This tarball is mainly intended to upload to Galaxy
as a distribution method, but you can use it directly to install the collection on target systems.
.. _trying_collection_locally:
Trying collections locally
--------------------------
You can try your collection locally by installing it from the tarball. The following will enable an adjacent playbook to
access the collection:
.. code-block:: bash
ansible-galaxy collection install my_namespace-my_collection-1.0.0.tar.gz -p ./collections
You should use one of the values configured in :ref:`COLLECTIONS_PATHS` for your path. This is also where Ansible itself will
expect to find collections when attempting to use them. If you don't specify a path value, ``ansible-galaxy collection install``
installs the collection in the first path defined in :ref:`COLLECTIONS_PATHS`, which by default is ``~/.ansible/collections``.
Next, try using the local collection inside a playbook. For examples and more details see :ref:`Using collections <using_collections>`
.. _publishing_collections:
Publishing collections
----------------------
You can publish collections to Galaxy using the ``ansible-galaxy collection publish`` command or the Galaxy UI itself. You need a namespace on Galaxy to upload your collection. See `Galaxy namespaces <https://galaxy.ansible.com/docs/contributing/namespaces.html#galaxy-namespaces>`_ on the Galaxy docsite for details.
.. note:: Once you upload a version of a collection, you cannot delete or modify that version. Ensure that everything looks okay before you upload it.
.. _galaxy_get_token:
Getting your token or API key
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To upload your collection to Galaxy, you must first obtain an API token (``--api-key`` in the ``ansible-galaxy`` CLI command). The API token is a secret token used to protect your content.
To get your API token:
* For galaxy, go to the `Galaxy profile preferences <https://galaxy.ansible.com/me/preferences>`_ page and click :guilabel:`API token`.
* For Automation Hub, go to https://cloud.redhat.com/ansible/automation-hub/token/ and click :guilabel:`Get API token` from the version dropdown.
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _upload_collection_ansible_galaxy:
Upload using ansible-galaxy
^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. note::
By default, ``ansible-galaxy`` uses https://galaxy.ansible.com as the Galaxy server (as listed in the :file:`ansible.cfg` file under :ref:`galaxy_server`). If you are only publishing your collection to Ansible Galaxy, you do not need any further configuration. If you are using Red Hat Automation Hub or any other Galaxy server, see :ref:`Configuring the ansible-galaxy client <galaxy_server_config>`.
To upload the collection artifact with the ``ansible-galaxy`` command:
.. code-block:: bash
ansible-galaxy collection publish path/to/my_namespace-my_collection-1.0.0.tar.gz --api-key=SECRET
The above 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 wish 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.
The API key is a secret token used by the Galaxy server to protect your content. See :ref:`galaxy_get_token` for details.
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _upload_collection_galaxy:
Upload a collection from the Galaxy website
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
To upload your collection artifact directly on Galaxy:
#. Go to the `My Content <https://galaxy.ansible.com/my-content/namespaces>`_ page, and click the **Add Content** button on one of your namespaces.
#. From the **Add Content** dialogue, click **Upload New Collection**, and select the collection archive file from your local filesystem.
When uploading collections it doesn't matter which namespace you select. The collection will be uploaded to the
namespace specified in the collection metadata in the ``galaxy.yml`` file. If you're not an owner of the
namespace, the upload request will fail.
Once Galaxy uploads and accepts a collection, you will be redirected to the **My Imports** page, which displays output from the
import process, including any errors or warnings about the metadata and content contained in the collection.
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _collection_versions:
Collection versions
-------------------
Once you upload a version of a collection, you cannot delete or modify that version. Ensure that everything looks okay before
uploading. The only way to change a collection is to release a new version. The latest version of a collection (by highest version number)
will be the version displayed everywhere in Galaxy; however, users will still be able to download older versions.
Collection versions use `Semantic Versioning <https://semver.org/>`_ for version numbers. Please read the official documentation for details and examples. In summary:
* Increment major (for example: x in `x.y.z`) version number for an incompatible API change.
* Increment minor (for example: y in `x.y.z`) version number for new functionality in a backwards compatible manner.
* Increment patch (for example: z in `x.y.z`) version number for backwards compatible bug fixes.
Backport/2.9/docs (#63247) * add more anchors to collections docs (#62827) (cherry picked from commit 7e01de96d741c6fb8a1ce04f92873ffb57c9b1b5) * add anchors to support galaxy links (#62808) (cherry picked from commit 1b3bf33bdf2530adb3a7cbf8055007acb09b3bb2) * doc: fix typos (#62852) (cherry picked from commit b33ae1494936cd04fa89bce51e6068829fc89a91) * Add some documentation about using plugins in collections (#62465) - FQCN requirements - Sharing code in collections - Limitations with inventory caching (cherry picked from commit d41050b28b2d3e8d4a97ce13344b04fc87f703a2) * Remove Latin phrases from the docs (#62419) * add styleguide about avoiding use of latin words (cherry picked from commit e7436e278f8945dd73b066c47280c1a17bc18ebe) * ovirt: Fixing typo in ovirt_disk examples (#62962) (cherry picked from commit 50dc41cca2e6d75a05e933c5286f41bde235b65f) * vmware guidlines: adjust the location of cloud-config-vcenter.ini.template (#62970) Update the location of the cloud-config-vcenter.ini.template template. The file has been moved by: 2e7d36a3f969b31570d7ee34e3f1f971c5c586a9. (cherry picked from commit 7ecfa4a471ae17ee15aa51f684bf7d340805d432) * Prefer https:// links in the docs site (#62939) This is a follow-up of last year's 1a11cec. It deals with links which at that point either were not present or did not support https://. (cherry picked from commit c8315bfd6097f680ae79de5e4d4ee23d0c1068c0) * fix minor typos (#62950) (cherry picked from commit ad580a71c475b570cdbd4c79aaf0082ecccdf5fc) * Modernize Vagrant documentation (#62923) * By requiring a slightly newer Vagrant version (from 2015) we get the same generated Ansible inventory format is still used by today's version of Vagrant. That extended inventory format also has the benefit of allowing for simpler Ansible examples. * Switching to a current and supported Ubuntu LTS version. (cherry picked from commit 0d79013f51ca67eddcb1a3f6ff0f4453b659ee81) * add ios/iosxr deprecated modules (#62908) (cherry picked from commit 6bbd9c9eca5992d9fc53dd8fd8814205afaf508d)
5 years ago
.. _migrate_to_collection:
Migrating Ansible content to a collection
=========================================
You can experiment with migrating existing modules into a collection using the `content_collector tool <https://github.com/ansible/content_collector>`_. The ``content_collector`` is a playbook that helps you migrate content from an Ansible distribution into a collection.
.. warning::
This tool is in active development and is provided only for experimentation and feedback at this point.
See the `content_collector README <https://github.com/ansible/content_collector>`_ for full details and usage guidelines.
Backport/2.9/docs2 (#62805) * Update pip module docs (#62359) * Clarifying pip module requirements in reference to #47361 * Further clarifying message with link to ansible_python_interpreter (cherry picked from commit d3ec5ca80f630ed8c78ea3fab73e0d2927a89b5e) * chore/doc-module: sts_assume_role.py (#62475) Update `Example` section with with the correct module usage. (cherry picked from commit a4a216640fc7efe436f3f09808500b52ff6a63cd) * Improve dconf documentation to include conversion problems (#62316) (cherry picked from commit 864928365ef000c187871e6874b520f0bd2bc97c) * Add examples for various inventory setups to the documentation (#62323) * Updates docs/docsite/rst/user_guide/intro_inventory.rst, closes #12480. * Use code-block and rename groups in inventory setup examples * Fix group name in inventory setup example Co-Authored-By: Sandra McCann <samccann@redhat.com> (cherry picked from commit 7047b66d345fc98c9ed163bbd47f3ee7c092f55b) * added networking porting guide info (#61999) * Update docs/docsite/rst/porting_guides/porting_guide_2.9.rst Co-Authored-By: Nathaniel Case <this.is@nathanielca.se> (cherry picked from commit 6d35f9026f521b3191a0ad5e5abbdeb1c46ec29e) * [docs] split collections into user and dev guide sections (#62363) (cherry picked from commit 7badeb6df0e644419adf2b5daf9545d448defe60) * fixed options (#62605) (cherry picked from commit 170b4e63ffa6115275cb78ebc0f68f8aa79f99a3) * ec2_vpc_subnet: Rename resource_tags > tags (#62663) Most of the AWS module documentation refers to `tags` and not `resource_tags`. This patch updates the documentation to match other AWS module documentation. 😉 Signed-off-by: Major Hayden <major@redhat.com> (cherry picked from commit cced1a3cd1e696cf5927ed248215d442dd6c1244) * [Docs] Document the resource module builder (#62222) (cherry picked from commit b17581a3075f571ed5b48126282e086a6efa30cc) * Fix link syntax and a typo in dev collections doc (#62650) (cherry picked from commit 2969614c2cb89151c3bf2487e0e1a1afe77cde96) * hcloud_volume: clarify volume size units (#62771) (cherry picked from commit 190b8fcd1cc413a8b3a6e5c9f3f74353990400dd) * ovirt_host update force doc (#62491) (cherry picked from commit 3b2b418aadc6ff2da4bae7f3d14ab8a51b207f77) * update example document for zabbix_action module (#62667) (cherry picked from commit 3299f29f7c7c4866baef78e8ae1d5272cd0b265d)
5 years ago
.. seealso::
:ref:`collections`
Learn how to install and use collections.
:ref:`collections_galaxy_meta`
Understand the collections metadata structure.
:ref:`developing_modules_general`
Learn about how to write Ansible modules
`Mailing List <https://groups.google.com/group/ansible-devel>`_
The development mailing list
`irc.freenode.net <http://irc.freenode.net>`_
#ansible IRC chat channel