Table of contents:
Make sure to checkout the official developer guide for developing collections.
- Python version 3.7 or higher
- pytest
- python-tss-sdk
Ansible requires that collections are stored in {...}/ansible_collections/NAMESPACE/COLLECTION_NAME
path.
Therefore to be able to run tests, clone this repository to {arbitrary path}/ansible_collections/delinea/ss
.
Example with using home directory:
mkdir -p ~/ansible_collections/delinea/ss
git clone [email protected]:DelineaXPM/ansible-ss-collection.git ~/ansible_collections/delinea/ss
cd ~/ansible_collections/delinea/ss
Create a new virtual environment
python3 -m venv env
source env/bin/activate
Install Ansible:
sudo apt update
sudo apt install ansible
Build Ansible Collection:
ansible-galaxy collection build --force
Run sanity tests:
ansible-test sanity
Run unit tests:
python3 -m pytest
Install and Run Ansible Lint:
pip3 install ansible-lint
ansible-lint
Install Ansible Collection locally
ansible-galaxy collection install delinea-ss-1.0.0.tar.gz --force
Test Ansble collection plugin
ansible-playbook playbook.yml
Follow [this link][delinea-ss-galaxy] to open the delinea.ss
collection in Ansible Galaxy hub.
-
Change the version number. Follow semantic versioning when setting the version for your collection:
- Increment the major version number, x of x.y.z, for an incompatible API change.
- Increment the minor version number, y of x.y.z, for new functionality in a backwards compatible manner (for example new modules/plugins, parameters, return values).
- Increment the patch version number, z of x.y.z, for backwards compatible bug fixes.
-
Update installation instructions in README.md.
-
Write a release summary:
Add [version_number].yml file under changelogs/fragment folder and write release summary in below format:
release_summary: `<describe release summary>`
Then generate changelog using below commands
pip install antsibull-changelog antsibull-changelog init <path/to/your/collection> antsibull-changelog release [--version version_number]
-
Build the collection:
ansible-galaxy collection build --force
As a result a new archive will be generated (e.g.
delinea-ss-1.0.0.tar.gz
) in the collection directory (~/ansible_collections/delinea/ss/
). -
Publish the collection:
ansible-galaxy collection publish ~/ansible_collections/delinea/ss//delinea-ss-1.0.0.tar.gz -api-key=SECRET