Collections overview, how to request a namespace
Ansible Collections Overview
.. contents:: Topics
Warning: Subject to frequent updates This is a "living document", expect it to change as we progress with the Collections work over the next few months.
As with any project it's very important that we get feedback from users, contributors and maintainers. We recognize that the move to Collections is a big change in how Ansible is developed and delivered. Therefore you should expect that the devel branch may be broken on occasion.
See the
Ansible Communication channels_ for a list of IRC channels and email lists you can use to join the discussion.
#ansible-communityin Freenode IRC
Community Working Group IRC meeting_
GitHub Issues_ against this repo
To understand where we are going, it's often useful to remind ourselves of where we came from.
Classic Ansible
ansible/ansible_.
ansible
ansiblehad major releases twice a year
The
ansible/ansible(
ansible-base) repository only contains:
ansible-{playbook,galaxy,doc,test,etc}
ansible-base
The rest of the modules and plugins have been moved into various "collections"
The released package of Ansible 2.10 will pull in
ansible-baseand the various community collections that were previously a part of
ansible/ansible
The
ansiblepackage (will contain a subset of collections) and depend on the new
ansible-basepackage (the Ansible engine).
Classic Ansible (CA) What we think of as Ansible prior to 2020. The open source project and the deliverable. What you currently get (as of Ansible 2.9 and earlier versions) when you type
pip install ansible. Was developed almost entirely within the
ansible/ansiblerepository on GitHub.
Collection A packaging format for bundling and distributing Ansible content: plugins, roles, modules. Can be released independent of other collections or
ansible-baseso features can be made available sooner to users. Installed via
ansible-galaxy collection install.
ansible(the package) A replacement software package (Python, deb, rpm, etc) which contains a select group of Collections. It contains the collections to ensure that Ansible 2.9 playbooks don't require any extra collections to be be installed. This list of what's included can be found at
ansible-build-data_. Will depend on the
ansible-basepackage. Was previously referred to as
ACD(Ansible Community Distribution).
ansible-baseNew for 2.10. The codebase that is now contained in github.com/ansible/ansible for the Ansible 2.10 release. It contains a minimal amount of modules and plugins and allows other collections to be installed. Similar to Ansible 2.9 though without any content that has since moved into a collection. The devel branch of
ansible/ansibleis now ansible-base.
There will be an
ansible-basepackage (RPM/Python/Deb package)with only the minimal set of modules and plugins).
Ansible Galaxy An online hub for finding and sharing Ansible community content. Also, the command-line utility that lets users install individual Ansible Collections,
ansible-galaxy install community.crypto.
galaxy.ansible.com_.
Fully Qualified Collection Name (FQCN) The full definition of a module, plugin, or role hosted within a collection, in the form
namespace.collection.content_name. Allows a Playbook to refer to a specific module or plugin from a specific source in an unambiguous manner, for example,
community.grafana.grafana_dashboard. The FQCN is required when you want to specify the exact source of a module and multiple modules with the same name are available. Can always be identified in a playbook; ideally not necessary in most playbooks, but in cases in which users have multiple collections installed with similar content, the FQCN will always be the explicit and authoritative indicator of which collection to use for content. Example:
cisco.ios.ios_configwould be the FQCN, and the playbook would generally call "ios_config" when this is required.
Namespace The first part of a Fully Qualified Collection Name, the namespace usually reflects a functional content category. Example: in
cisco.ios.ios_config, “Cisco” is the Namespace. Namespaces are reserved and distributed by Red Hat at Red Hat’s discretion. Many, but not all, namespaces will correspond with vendor names.
Collection name In the second part of a Fully Qualified Collection Name, the collection name further divides the functional characteristics of the collection content and denotes ownership. For example, the cisco namespace might contain
cisco.ios,
cisco.ios_community, and
cisco.ios_prc, containing content for managing ios network devices maintained by Cisco.
community.general (collection) A special collection managed by the Ansible Community Team containing all the modules and plugins which shipped in Ansible 2.9 that don't have their own dedicated Collection. See community.general on
Galaxy_ or it's
GitHub repository_ .
community.network (collection) Similar to
community.general, though focusing on Network modules. See community.network on
Galaxy_ or it's
GitHub repository_ .
Repository The location of the source code included in a collection. Contributors make suggestions, fix bugs, and add features through the repository. Collection owners can host repositories on GitHub, Gerrit, or any other source code repository platform they choose.
Although this document focuses on Community (upstream) content, there will be Product (downstream) equivalents of the above. Links to the Product documentation will be added once they are available.
Using Ansible Collections_
Developing Collections_
Ansible Collections Checklist_
Ansible 2.9 already contains basic support for Collections.
The majority of the ansible-base 2.10 release cycle is for:
status.rst_ for dates of beta, RC, Release dates for
ansible 2.10
ROADMAP_2.10_ for dates of beta, RC, Release dates for
ansible-base 2.10
Using Ansible Collections_
Q: Once the next version of Ansible is released, will my playbooks still work ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For users of the community version of ansible
pip/apt-get install ansiblewill continue to give you a working install of Ansible including the three thousand plus modules that previously shipped with Ansible 2.9.
Q: I deploy Ansible directly from devel. Is that still advised? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We recognize that many users install Ansible directly from devel, and generally we do our best to keep the devel branch stable. These changes, however, will have a very large short-term impact, and we cannot guarantee that devel will be as stable as it has been in the past through this migration process.
These changes, however, will have both a temporary and permanent impact.
Temporarily
Permanent
ansible-playbook) and the ansible collections that their playbooks rely on. The collections will reside in multiple other git repositories (or can be installed from galaxy).
Q: When will the next version of Ansible be released with these changes? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We don't have a firm date yet, but we plan to release Ansible 2.10 sometime in 2020, and we do expect to have several alpha/beta releases between now and then. Until that time, Ansible 2.9 will continue to be the available version.
Q: I'd like to consume the development stream of Ansible during this process. How do I do that? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You can pip install ansible-base by doing:
python -m pip install --user https://github.com/ansible/ansible/archive/devel.tar.gz
Individual collections can be installed by doing:
ansible-galaxy collection install NAMESPACE.COLLECTION
Q: What exactly is ansible-base for and what does it contain ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Ansible-base is the name of the code and package for what github.com/ansible/ansible has become now that most of the content has been removed.
use-cases for ansible-base """"""""""""""""""""""""""
ansible[|-playbook|-galaxy|-pull|-doc|-test]--help
Being able to install content from Galaxy or Automation Hub
ansible-galaxy collection ...
Being able to install supported content via packages
ansible-galaxy collection install ..., they want RPMs
Include things that are "hardcoded" into Ansible
statis used to handle any file information internally
include_tasksis hardcoded as the implementation is inside the engine, same with
add_host,
group_by,
debugand others, async_wrapp, async-poll, assert/fail are 'parts of the language'
Development
ansible-test sanity,units,integrationagainst the Ansible code base
Parts of the Windows codebase that can't currently be removed from ansible-base.
Bugs in ansible-base should be reported via
ansible/ansible issues_.
Developing Collections_
Ansible Collections Checklist_
Q: I'd like to submit a new module or plugin to Ansible. How shall I proceed? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you're a vendor/partner and you're writing Ansible content to interact with your software, we recommend writing your own collection. This will allow you to pursue certification against the Ansible Automation Platform. For more info on certification, read the
Partners Page_.
If you want to submit your module to the
community.generalCollection, please wait till this repo has been created. FIXME, Possible direct to dedicated collection, otherwise fallback to c.general
If you want to submit your module to an existing collection, you'll want to coordinate with the maintainers of those collections and follow their guidelines.
As of today ansible-base (github.com/ansible/ansible) will no longer accept new modules.
Q: I'd like to submit a pull request to an existing Ansible module. How will I know where this module will live? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We will have a
mapping_ of old modules to their new homes. Should you submit a PR to the wrong repository, we will close it and point you to the correct repository.
For new PRs please wait for the new Collections to be created. FIXME
Q: I have existing pull requests to existing modules that will become part of the Ansible Community Collection. What will happen to those? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FIXME Pull requests merged before
ansible/ansible:develis frozen will end up in the new collections.
Pull requests not merged before the freeze, will need to be recreated in the corresponding new Collection Repo. We will have a tool to help move PRs from one repo to another.
Q: What happens if I don't move my content into a collection? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Content that doesn't end up in its own Collection will end up being automatically migrated to
community.generalduring the devel freeze window.
Q: Why would I want a dedicated collection? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The benefits of claiming content are the following:
Q: What will versioning and deprecation look like for Collections ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
In ansible/ansible:
In Collections
semver (Semantic Versioning)_
Details around versioning and deprecation policy are still being worked on, we will have a proposal up shortly
Q: What should I do to move plugins across collections during migration? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
See
Migrating content to a different collection_ .
Q: How can I fix bugs in Ansible 2.9? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The
previous policy_ was:
changelog/fragmentfile
devel
git cherry-pick -x) PR against the
stable-2.9branch
Once content has been removed from the
develbranch, the process will be:
ansible/ansible:stable-2.9(ie not a backport) including a
changelog/fragmentfile