I have situations where I wish for a role to be used in a certain way, ie everything inside of it tagged or have something like 'local_action' or perhaps even a when condition.
Problems
As it stands the only way to do this is place this condition on every single task in the role or do it at playbook level, however much of the time I cannot dictate how people create a playbook.
What problems exist that this proposal will solve?
I wish to tag everything inside of a role, for example a 'base' role which I am only using meta dependencies for simply every task.
I wish to change the way a role is ran but have no control of the playbook which calls this role. Aside from again setting every task in the role there is no easy way around this.
Solution proposal
The idea here is to have a properties type folder within a role which allows you set conditions or properties for the entirety of that role which is already achievable from the playbook level but instead make this part of the role itself.
Anything that can be applied to a role at the playbook level should be allowed to be set inside of this properties folder.
Documentation (optional)
This will require some additional documentation under role usage.
Proposal: Add properties to roles
Author: Rick Box <@boxrick> IRC: boxrick
Date: 22/01/2018
Motivation
I have situations where I wish for a role to be used in a certain way, ie everything inside of it tagged or have something like 'local_action' or perhaps even a when condition.
Problems
As it stands the only way to do this is place this condition on every single task in the role or do it at playbook level, however much of the time I cannot dictate how people create a playbook.
What problems exist that this proposal will solve?
Solution proposal
The idea here is to have a properties type folder within a role which allows you set conditions or properties for the entirety of that role which is already achievable from the playbook level but instead make this part of the role itself.
Anything that can be applied to a role at the playbook level should be allowed to be set inside of this properties folder.
Documentation (optional)
This will require some additional documentation under role usage.