Thank you taking the time to improve the 1Password Ansible collection!
After reading this document, you will:
- have set up a development environment;
- know how to file issues;
- understand the pull request process.
If you have already installed a supported version of Ansible, you can skip to the Clone the Repo step.
This collection requires Python v3.9 or greater. If you don't have Python installed, consider using pyenv to install the supported Python runtime.
Current Ansible-core and Ansible version supported:
ansible-core
: >=2.15ansible
: >=7.x
We recommend installing Ansible in a virtualenv
created specifically for this project.
python3 -m venv <path_to_venv>/onepassword_ansible
source <path_to_venv>/onepassword_ansible activate
pip3 install 'ansible-core==2.15.*' 'ansible>=7.x'
Please create a personal fork of the repository before beginning any work. The GitHub guide on forks and PRs is a great place to learn more about this process.
Ansible is particular about the folder structure for custom collections. Before Ansible can recognize the collection, its namespace must live inside a folder named ansible_collections/
. For this repository, all onepassword
collections must exist within the onepassword
namespace folder.
For more information about the ANSIBLE_COLLECTIONS_PATHS
environment variable, visit the Ansible documentation.
# Create the special ansible_collections folder and the onepassword namespace directory
mkdir -p ~/onepassword/ansible_collections/onepassword
cd ~/onepassword/ansible_collections/onepassword
# Clone the collection repo into the namespace: {..}/ansible_collections/onepassword
git clone [email protected]:1Password/ansible-onepasswordconnect-collection.git connect
cd connect
# Extend Ansible's collection lookup path
# to first look for collections inside ~/onepassword/ansible_collections/...
export ANSIBLE_COLLECTIONS_PATHS=~/onepassword:$ANSIBLE_COLLECTIONS_PATHS
# Verify - you should see docs for the `generic_item` module in your terminal
# activate your virtualenv before running the following
ansible-doc onepassword.connect.generic_item
We run our tests using Docker images. See tests/README.md for complete instructions.
We welcome you to file bug reports and feature requests through GitHub issues.
There are templates for issues and feature requests, but if the issue does not fall into either category, please use an empty issue and be as specific as possible.
Open a new PR using a branch from your personal fork. Again, the GitHub guide on forks and PRs is a great resource!
When describing the PR, please provide the following:
- Summary of changes
- How the changes impact the end-user
- How to test the change