Ansible customer¶
Python module to manage an Ansible project, linked to Infopen Ansible customer cookiecutter template.
It expose some cli to manage an Ansible project, with settings for each environment.
We use Invoke tasks, linked to their cli to run commands inside contexts.
- Free software: MIT license
- Documentation: https://ansible-customer.readthedocs.io.
Testing¶
You must have Docker >= 1.13.0 installed to run the tests. We use it to check Ansible commands
To run tests locally, just run needed environments using tox:
$ TOXENV=py27-ansible23 tox
You can enable Paramiko debug if you have an error on Docker fixture create
(ex: Exception: Timeout reached while waiting on service!
)
$ PARAMIKO_DEBUG=1 TOXENV=py27-ansible23 tox
Features¶
Ansible-playbook cli wrapper¶
Entry point:aci-ansible-playbook
This is the wrapper over the ansible-playbook
command.
List-tags¶
aci-ansible-playbook list_tags my_playbook
Simple task to list tags managed by a playbook.
List-tasks¶
aci-ansible-playbook list_tasks my_playbook
Simple task to list tasks managed by a playbook.
Ansible-galaxy cli wrapper¶
Entry point:aci-ansible-galaxy
This is the wrapper over the ansible-galaxy
command.
Install¶
aci-ansible-galaxy install requirement_file [-f]
Simple task to install roles managed by the requirement file.
List-roles¶
aci-ansible-galaxy list_roles [--role-name=my_role]
Simple task to list role(s) installed.
Molecule cli wrapper¶
Entry point:aci-molecule
This is the wrapper over the molecule
command.
Dependency¶
aci-molecule dependency scenario_name
Simple task to download dependencies required by scenario.
Destroy¶
aci-molecule destroy scenario_name [--driver=docker]
Simple task to destroy test instances.
Test¶
aci-molecule test scenario_name [--driver=docker]
Simple task to run tests against instances and destroy them.
Credits¶
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.