Name: molecule-validate-cinder-deploy
Owner: rcbops
Description: null
Created: 2018-02-13 16:13:36.0
Updated: 2018-05-22 23:00:58.0
Pushed: 2018-05-22 23:00:59.0
Homepage: null
Size: 56
Language: Python
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a simple test repo using the molecule framework for deploying system state via ansible and validating that state using infratest.
The following packages should be installed via pip in order to run molecule. In order to isolate the dependencies, it is recommended that you use a python virtualenv. However, such a virtualenv must be located outside of the directory structure of this repo or the ansible linter will attempt to verify the dynamic yaml inside of core ansible and fail spectacularly because the entire virtualenv directory will be in scope for lint inspection.
Here are the basic steps to get started with this repo:
path/where/the/repo/will/be/cloned/to
ualenv --python python2 venv-molecule
nv-molecule/bin/activate
install molecule testinfra ansible docker-py
clone git@github.com:phongdly/molecule-validate-cinder-deploy
olecule-validate-cinder-deploy
cule test
This branch uses the delegated
driver. You must ensure that your ssh
configuration is setup to connect to the SUT, that you have an ssh-agent
running, and that the key for the SUT has been added to the running agent.
A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well.
A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles.
Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:
- hosts: servers
roles:
- { role: molecule-validate-cinder-deploy, x: 42 }
The moleculerize.py
script will build molecule config files from a RPC-O Ansible dynamic inventory file. As a
prerequisite to using the moleculerize.py
script a dynamic inventory must be generated from a RPC-O build:
su -
opt/openstack-ansible/playbooks/inventory
namic_inventory.py > /path/to/dynaic_inventory.json
Now you can generate a molecule.yml
config file using the moleculerize.py
script:
path/to/molecule-validate-cinder-deploy
leculerize.py /path/to/dynaic_inventory.json
The above command assumes that the templates/molecule.yml.j2
template will be used along with molecule.yml
as
the output file.
Apache
An optional section for the role authors to include contact information, or a website (HTML is not allowed).