primogen
A brief description of the role goes here.
Tests
Requirements
Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required.
- ansible >= 2.0
Role Variables
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.
- debug: flag to run debug tasks.
Dependencies
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.
Playbooks
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: username.rolename, x: 42 }
Tags
- configuration: configuration tasks.
- debug: task to debug role variables.
- installation: installation tasks.
- validation: task to validate role variables.
Test
To run the tests you will need to install:
To run all tests against all pre-defined OS/distributions * ansible versions:
$ tox
To run tests for trusty64
:
$ cd tests
$ bash test_idempotence.sh --box trusty64.vagrant.dev
# log file will be stores under tests/log
To perform debugging on a specific environment:
$ cd tests
$ vagrant up trusty64.vagrant.dev
# to provision using the test.yml playbook (as many time as you need)
$ vagrant provision trusty64.vagrant.dev
# to access the Vagrant box
$ vagrant ssh trusty64.vagrant.dev