[tripleo] please avoid creating ansible playbooks that call modules for trivial tasks
Jesse Pretorius
jesse at odyssey4.me
Mon Nov 2 18:24:39 UTC 2020
On Mon, 2020-11-02 at 16:40 +0000, Sorin Sbarnea wrote:
IMHO, roles (inside collections) do provide quite good abstraction layer as they allow us to change implementation without changing the API (the variables passed to the role).
If the role uses an embedded module, external one or lots of tasks to achieve the same functionality it is an implementation details.
At any point in time we can refactor the role internals and create new modules, swap them, .... without messing its consumption.
I cannot say the same about playbooks, especially those that call modules directly. If they call roles, we should be fine.
Good point.
That reminds me - to really make roles work more like an API, we should also probably implement tests which determine whether the API is changing in an acceptable way. We'd have to agree what 'acceptable' looks like - at the very least, I would imagine that we should be enforcing the same inputs & results with changes being additive unless there's sufficient deprecation.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20201102/b0d2a51e/attachment-0001.html>
More information about the openstack-discuss
mailing list