Table of contents:
Make sure to checkout the official developer guide for developing collections.
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/core
.
Example with using home directory:
mkdir -p ~/ansible_collections/delinea/core
git clone [email protected]:DelineaXPM/ansible-core-collection.git ~/ansible_collections/delinea/core
cd ~/ansible_collections/delinea/core
Configure pre-commit:
python3 -m pip install pre-commit --user && pre-commit install && pre-commit
We use Mage build tool to automate most of the tasks related to development. Mage is installed by aqua manager.
Create a new virtual environment and install ansible:
mage init
Run unit and sanity tests:
mage test
To list all available mage targets run mage -l
.
Follow this link to open the delinea.core
collection in Ansible Galaxy hub.
-
Bump a new version. Available arguments are
"patch"
,"minor"
and"major"
:mage bump "patch"
-
Update installation instructions in README.md.
-
Write a release summary:
mage changelog
-
Build the collection:
mage build
As a result a new archive will be generated (e.g.
delinea-core-1.0.0.tar.gz
) in the artifacts directory (.artifacts/
). -
Publish the collection:
mage publish
Run mage doctor
to validate all the requirements for publishing are installed.