Ansible roles management
Project description
Ansible roles management
The goal of this tool is to manage installation and upgrade of Ansible roles using git tags and branches.
This tool uses the requirements.yml
configuration file used by Ansible
Galaxy. The syntax is unchanged and the ansible-galaxy tool can be used
by people not involved in playbooks development.
This tool assumes a role version follows semantic versioning and is labelled with a git tag of the form vX.Y or vX.Y.Z (examples: v1.0 or v2.3.1). In fact the v is optional but recommended for clarity.
Roles managed manually, bare, or in a bad shape are ignored (with proper warning).
Installation
You can install it using PyPI:
pip install ansible-roles-ctl
Or you can run it in-place since it has very few dependencies (you only need the ansible-roles-ctl script, version.py is only used in the build process).
You need the following dependencies:
- Ansible (probably starting from 2.7)
- GitPython (package 'python3-git' on Debian systems, or using pip)
Usage
Syntax is as follow:
ansible-roles-ctl [global options] [subcommand] [subcommand options]
You can use -h/--help option to list all available options at command and subcommand level, as well as all available subcommands.
Follows documentation about the various subcommands.
Status
ansible-roles-ctl status
This subcommand display a status report about all required roles.
You can limit output to a selection of roles:
ansible-roles-ctl status mailman3 httpd
The -c/--changelog option displays changelog entries if available.
Install
ansible-roles-ctl install
This subcommand install all roles listed in the requirements.
You can limit this action to a selection of roles:
ansible-roles-ctl install bind9 postfix
Update
ansible-roles-ctl update
This subcommand update all roles listed in the requirements to the latest version.
You can limit this action to a selection of roles:
ansible-roles-ctl update bind9 postfix
It is possible to update roles to a particular version and update the requirements (downgrade is possible):
ansible-roles-ctl update bind9=1.1
The -r/--req-update option regenerates the requirements file according to the requested updates. You need to check the result before commiting; in particular, invalid roles cannot be loaded properly and would thus be skipped (we hope this limitation to be lifted in a future version).
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ansible-roles-ctl-1.0.1.tar.gz
.
File metadata
- Download URL: ansible-roles-ctl-1.0.1.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e4893e3b461105660613b7fe7d6d72a2d6ad85bed6919649b500843f6160160 |
|
MD5 | 79a1ef067295e3731dc3afe5837297d7 |
|
BLAKE2b-256 | cbea83c87d900d757f505cf6d01d901bcd76b85fb62aa4305e6c371fb0b457e2 |
File details
Details for the file ansible_roles_ctl-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: ansible_roles_ctl-1.0.1-py3-none-any.whl
- Upload date:
- Size: 24.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.4.2 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.48.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39c21312ac0773530ebf952b7fa9ee94ab4bdfcc1d36a0f0e1215d2fcd3985ca |
|
MD5 | ed8544ce7059b019b72ff94c6753ca04 |
|
BLAKE2b-256 | 8679ac9021e7537f8e927bc09b14abd7b6a707094278ca5d0f0a7ee29aedadc1 |