Ansible as configuration management tool

Hello all,

If I have some Ansible playbooks as part of source code repository. And if do not want to do all this work in Foreman UI. I would like to configure Foreman in such a way so that it can pick these playbooks and inventory files from my git repo and run them in the managed host. Is this feature available?


There is not yet a feature that supports importing git repositories into Foreman and support their playbooks.
It is definitely something to look into, but more as a way to migrate such git repositories to Foreman and from then on manage playbooks and roles from within foreman.

I have the same situation at the moment and keep my playbooks in git repositories, which follow best practices suggest[1]. Those are simply checked out on disk and a job pulls and runs them scheduled. Ansible has reporting to Foreman enabled to have the hosts states.


1 Like

There is work in pulp-3 to support ansible files directly. Here is a recent
video demo[1]. The pulp devs are aware of the importance of git for
managing these files but more feedback and encouragement would be good. I
hope the foreman-ansible devs are looking to integrate playbook/role
sources with existing katello features such as the file repo type and
future work.



This subject interests me but the video is no longer available. Is it possible to view it?

This topic is quite similar to the foreman-git-template plugin on the bottom. But it deals with ansible sync collections and roles per git per branch.