Small tool for automatic download roles and libs a-la-Gemfile
# Preamble
As many roles have changed their configurations among time, anyone would use a
specific version of a role (for instance, a commit, or a branch, or a tag).
Moreover, a complex playbook could need different versions from the same role.
This app will download roles (bundles, from now on) from their
repositories before launching a playbook. _That means that a role should be in
its own repository_.
# Prerequisites
- Ansible. Any version.
- Git >= 1.8.5
- Python 2 >= 2.6
# Installation
## The easy way: pip
`sudo pip install ansible-bundle`
## The not-that-easy way: from code
- Download [latest release](../../archive/master.zip)
- Run `sudo python setup.py`
# Syntax
`ansible-bundle FILEYAML [ansible-playbook-options] [ansible-bundle-options]`
ansible-bundle, along the ansible-playbook parameters, has also these:
- `--bundle-clean-roles` Will clean roles and library directories before download (*)
- `--bundle-dry` Shows what will be run (as it won't download anything,
also won't search for dependencies)
- `--bundle-deps-only` Don't run the playbook, just satisfy dependencies.
- `--bundle-disable-color` Useful for non-interactive consoles
- `--bundle-workers` concurrent connections when downloading/updating roles. Default: 1
- `--bundle-safe-update` Don't clean existing roles. (*)
(*) If both `bundle-clean-roles` and `bundle-safe-update` are set, `bundle-clean-roles` will take effect.
# Configuration
ansible-bundle expects to find a `[bundle]` section into ansible.cfg, which may
contain some of the command lines parameters:
- workers
- verbosity
- safe
And the following extra options:
- `url`: URL where the roles are located. For example, if role `apache` is in
`github.com/foo/roles/apache`, the `url` should be set to `github.com/foo/roles`.
Default is 'https://github.com'
## bundle.cfg example
[bundle]
url='git@github.com:devopsysadmin/ansible-roles'
workers=5
verbosity=1
# Example of use
Given the following playbook (site.yml):
- include: site-common.yml
tags:
- common
- hosts: all
roles:
- postgresql@1.0
- { role: apache, version: '2.4' }
Running `ansible-bundle site.yml` will search roles into the `site-common.yml` file and
add to download queue, which already includes postgresql 1.0 and apache master.
Please note that each role is intended to be in its own repository, not in a folder.
# Changelog
## v 0.6
- Syntax role/version changes to role@version. This simplifies the configuration in
ansible.cfg and allows branches names such as feature/something in role version.
If a versioned role with the previous syntax is found, will complain with a
deprecation warning. The previous syntax will be obsoleted in v 0.7.
# Author
David Pedersen (david.3pwood AT gmail DOT com)
# License
GNU Public License v2 (GPLv2)
Metadata
Release files for ansible-bundle 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ansible-bundle-0.7.0.tar.gz | 8.7 kB | Without provenance | Details for ansible-bundle-0.7.0.tar.gz |
Release files / ansible-bundle-0.7.0.tar.gz
| Download URL | ansible-bundle-0.7.0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9a0d792c192a1b1129276113b39f12e164a9e6b273000031abb25ce26a7d53e
|
|
BLAKE2b-256 checksum How to use checksums |
15062f9b97cad9c4ccff393a7d180685adc6a8f6c088f0c0d9ecb77821f1705f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ansible-bundle 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.