Contributing to collections


目录

If you want to add functionality to an existing collection, modify a collection you are using to fix a bug, or change the behavior of a module in a collection, clone the Git repository for that collection and make changes on a branch. You can combine changes to a collection with a local checkout of Ansible (source hacking/env-setup). You should first check the collection repository to see if it has specific contribution guidelines. These are typically listed in the README.md or CONTRIBUTING.md files within the repository. See collection_quickstart for more general guidelines and testing_running_locally for testing guidelines.

Contributing to a collection: community.general

These instructions apply to collections hosted in the ansible_collections GitHub organization. For other collections, especially for collections not hosted on GitHub, check the README.md of the collection for information on contributing to it.

This example uses the community.general collection. To contribute to other collections in the same GitHub org, replace the folder names community and general with the namespace and collection name of a different collection.

Prerequisites

Creating a PR

mkdir -p ~/dev/ansible/collections/ansible_collections/community
cd ~/dev/ansible/collections/ansible_collections/community
git clone git@github.com:ansible-collections/community.general.git general
cd ~/dev/ansible/collections/ansible_collections/community/general
git remote add upstream git@github.com:ansible-collections/community.general.git

You can test your changes by using this checkout of community.general in playbooks and roles with whichever version of Ansible you have installed locally, including a local checkout of ansible/ansible's devel branch.

collections
Learn how to install and use collections.

contributing_maintained_collections
Guidelines for contributing to selected collections

Communication<communication>
Got questions? Need help? Want to share your ideas? Visit the Ansible communication guide


版本号 #2
由 壳壳虫 创建于 2026-10-31 14:33:36 UTC
由 壳壳虫 更新于 2026-10-31 14:33:37 UTC