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.
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
Entry point: aci-ansible
This is the wrapper over the ansible
command.
aci-ansible ping my_hosts [--limit=foo]
Simple task to run ping module over an host list.
aci-ansible setup my_hosts [--limit=foo]
Simple task to run setup module over an host list.
Entry point: aci-ansible-playbook
This is the wrapper over the ansible-playbook
command.
aci-ansible-playbook list_tags my_playbook
Simple task to list tags managed by a playbook.
aci-ansible-playbook list_tasks my_playbook
Simple task to list tasks managed by a playbook.
aci-ansible-playbook run my_playbook [--limit=foo]
Simple task to run a playbook.
Entry point: aci-ansible-galaxy
This is the wrapper over the ansible-galaxy
command.
aci-ansible-galaxy install requirement_file [-f]
Simple task to install roles managed by the requirement file.
aci-ansible-galaxy list_roles [--role-name=my_role]
Simple task to list role(s) installed.
aci-ansible-galaxy remove my_role1[,my_role2,...]
Simple task to remove role(s).
Entry point: aci-molecule
This is the wrapper over the molecule
command.
aci-molecule create scenario_name [--driver=docker]
Simple task to start test instances.
aci-molecule converge scenario_name
Simple task to configure test instances.
aci-molecule dependency scenario_name
Simple task to download dependencies required by scenario.
aci-molecule destroy scenario_name [--driver=docker]
Simple task to destroy test instances.
aci-molecule list scenario_name [--output=simple]
Simple task to list test instances status.
aci-molecule login scenario_name host
Simple task to login into test instance.
aci-molecule test scenario_name [--driver=docker]
Simple task to run tests against instances and destroy them.
aci-molecule verify scenario_name
Simple task to run automated tests against instances.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.