Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Manage ansible role and modules versioned dependencies.

Project Description
# ansible-bundle

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 and modules (bundles, from now on) from their
repositories before launching a playbook.

# 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 satisfies 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


# Unversioned bundles

This program will download from a GIT repository a branch (or tag). If no
branch is set, will try to download master. But, in order to have an
unversioned bundle living peacefully with a versioned bundle, those unversioned
will be downloaded within their own directory. So, if you have (or need)
unversioned bundles, add or modify this line to `ansible.cfg`, into `defaults`
section:

- Before:

[defaults]
...
roles_path = ./roles
...

- After:

[defaults]
...
roles_path = ./roles/unversioned:./roles
...

# 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
download them. Also, will download role postgresql 1.0 and apache master.

# Author

David Pedersen (david.3pwood AT gmail DOT com)

# License

GNU Public License v2 (GPLv2)
Release History

Release History

This version
History Node

0.6.0

History Node

0.5.2

History Node

0.5.1

History Node

0.5.0

History Node

0.4.5

History Node

0.4.4

History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

History Node

0.4.0

History Node

0.3.13

History Node

0.3.12

History Node

0.3.11

History Node

0.3.10

History Node

0.3.9

History Node

0.3.8

History Node

0.3.7

History Node

0.3.6

History Node

0.3.5

History Node

0.3.3

History Node

0.3.1

History Node

0.3.0

History Node

0.2.20

History Node

0.2.19

History Node

0.2.18

History Node

0.2.17

History Node

0.2.16

History Node

0.2.15

History Node

0.2.13

History Node

0.2.12

History Node

0.2.11

History Node

0.2.10

History Node

0.2.9

History Node

0.2.8

History Node

0.2.7

History Node

0.2.6

History Node

0.2.5

History Node

0.2.4

History Node

0.2.3

History Node

0.2.2

History Node

0.2.1

History Node

0.2

History Node

0.1

History Node

0.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
ansible-bundle-0.6.0.tar.gz (8.4 kB) Copy SHA256 Checksum SHA256 Source Apr 26, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting