Role Design Best Practices.
Keep roles specific.
Yes.
In keeping with that notion of don't repeat yourself or DRY and
in the software architecture of microservices,
it's good to have your playbooks do one thing and one thing really,
really well.
And then you take related playbooks and put them into a
role that does something else really, really.
You see, that's the idea.
Don't unnecessarily complicate your system.
Again,
you may not be the last person to read or to look at
this role that you've created.
By creating a good README, you're being a good citizen to the person behind you.
Never hardcode passwords or sensitive data, general rule of thumb.
You should use Ansible Vault if you don't have a separate secrets
management platform. For more complex configurations,
remember,
you can invoke win_command just to run any arbitrary terminal
command. And also, measure twice, cut once. Test the roles
thoroughly in different environments.
Don't just commit directly to your production branch.