I'm using Vagrant+Ansible on a project. I want to make it optional for the user to provide a role called "workspace" which will be included in the provisioning. This allows the user to set his own preferred prompt, editor etc.
If a role that doesn't exist is specified in a playbook, the whole thing crashes with
ERROR! The role 'workspace' was not found ...
I would like it to simply ignore it and move on. I tried adding failed_when: false
, but unsurprisingly it had no effect. It is possible to formulate a when: ...
condition that can check if the role exists? Or is there another way to solve this nicely?