this post was submitted on 30 Jun 2023
6 points (100.0% liked)

Ansible

239 readers
1 users here now

# TODO

founded 2 years ago
MODERATORS
 

We use AAP to deploy roles. The roles are in Git. I now have 2 roles that need to deploy the same files and templates, and of course I don't want to keep 2 versions in Git. How could I solve that?

you are viewing a single comment's thread
view the rest of the comments
[–] mea_rah 2 points 2 years ago

Is it possible that the files and templates could (should?) be part of separate role that you perhaps pull in as dependency?

The other pattern I saw out there was that the file/template wasn't part of the roles, but was instead provided by playbook that is using the roles. So file was in repository with playbook and template/file path was passed to role as parameter.