Open JJediny opened 6 years ago
Hey @JJediny great question. What I would recommend is following a similar pattern that kubevirt did. The apb is in the kubevirt-apb repo and the "production playbooks" are kubevirt-ansible.
This model separates the apb from the ansible-playbook and pulls in the ansible-playbook with a ansible-galaxy install xxxxx
, which is essentially a git clone that's done as part of the container build. Once you have the separate apb repo and you're pulling the production playbook into the contianer, now you can create a playbook in the apb repo that is formatted like an apb. That playbook would run an import playbook: production_playbook.yml
to call the production role(s) so you can maintain you existing format.
Let me know if that works for you.
@JJediny I want to add on top of Ryan's comments that we are looking to refactor the APB format so that it better conforms to a Galaxy role. The timeline for this is probably end of May. This will allow you to publish and share APBs on Galaxy as well.
@JJediny just wanted to make you aware that we have updated a few of our APBs to better conform to Galaxy role style.
The most important part to that change was to update the associated Dockerfile and rpm spec. For example here is the modified Dockerfile for mediawiki and here is the modified RPM spec. Not sure if you need to worry about building RPMs but thought I would share anyway. Hope this helps.
As a user...
I found/find myself struggling to understand the best way to format my git repository for an APB
service
that is also currently being used as an ansiblerole
in production . Is there a way to structure an ansible repository to support both sets of best practices?Role example from https://docs.ansible.com/ansible/2.5/user_guide/playbooks_reuse_roles.html
APB example from https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/blob/master/docs/getting_started.md
Is there a way to make a repo minimally conformant to both? and if not that what are the best suggestions for those trying to migrate current ansible roles into an APB, while still keeping them maintainable in the ansible galaxy default/defacto file directory layout?