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?

Thanks.

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] http://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html

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.

[1] https://www.youtube.com/watch?time_continue=557&v=Vl-wlDoMJc0

2 Likes

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.

Thanks