Testing roles

Hi everyone,

I’m working on an Ansible setup where it would be extremely helpful to be able to test roles and changes to a role before they were moved into the roles folder used by ansible, as defined in the /etc/ansible/ansible.cfg file. Ideally it could check all the roles in a specified folder for syntax to help prevent issues from getting into the “live” folder so to speak. Does anyone know of a way to do this? Thank you!

Put the code in a version control system like Git.
Then you can have different feature branches that get merged in to production branch when they are tested.

I would also recommend automated testing using Travis-CI or Jenkins, see:

https://github.com/Oefenweb/ansible-supervisor/blob/master/.travis.yml