Say I have a backup role that sets up my preferred backup solution. Also say I have a separate Docker role that installs Docker on a given host. If a Docker host is in the backup role, I want to add /var/lib/docker to the list of directories to be backed up.
The only way I can think to do this is creating a separate xBackup role that backs up the given role. Is there a better way? I only need to execute a single task, typically a lineinfile appending a new backup directory. It just seems excessive to create a new role for one task, or to have to scatter the logic for a given set of tasks across several locations.
Thanks.