# Foreman integration with Ansible, your thoughts?

**URL:** <https://forum.ansible.com/t/foreman-integration-with-ansible-your-thoughts/19618>\
**Category:** Ansible Project\
**Created:** [October 26, 2015, 6:17pm UTC](https://forum.ansible.com/t/foreman-integration-with-ansible-your-thoughts/19618 "2015-10-26T18:17:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_Lobato](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@Daniel\_Lobato](https://forum.ansible.com/u/Daniel_Lobato)\
**Post date:** [October 26, 2015, 6:17pm UTC](https://forum.ansible.com/t/foreman-integration-with-ansible-your-thoughts/19618/1 "2015-10-26T18:17:29Z")

</div>

Hi Ansible community,

I've been investigating in the past few days about how to integrate  
[http://theforeman.org/](http://theforeman.org/) with Ansible as a Foreman plugin.

Foreman is a lifecycle management tool for your systems provisioning,  
monitoring and reporting, and it's been very popular in other  
communities, but we've never came around integrating it with Ansible.  
Foreman has a pluggable architecture, so many interesting features, such  
as metal discovery, Docker integration, Salt, etc.. can be done as plugins.

I posted an analysis on the Foreman developers mailing list -  
[https://groups.google.com/forum/#!topic/foreman-dev/cjj2g3bS8ho](https://groups.google.com/forum/#!topic/foreman-dev/cjj2g3bS8ho) and I  
would absolutely appreciate your comments on this.

Best, thank you!

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 26, 2015, 11:02pm UTC](https://forum.ansible.com/t/foreman-integration-with-ansible-your-thoughts/19618/2 "2015-10-26T23:02:14Z")

</div>

My first thought is that to save 'facts' create a persistent fact  
caching plugin, not a callback, then it works both ways, extra facts  
in foreman will be available to ansible and every time ansible gathers  
facts it refreshes them.

As for inventory, reading the inventory file might not be enough,  
ansible can use many different inventories and formats also there are  
host and group variables to consider.

---

<div class="post-metadata">

**Author:** ![Daniel\_Lobato](https://avatars.discourse-cdn.com/v4/letter/d/e19adc/32.png) [@Daniel\_Lobato](https://forum.ansible.com/u/Daniel_Lobato)\
**Post date:** [October 27, 2015, 3:53pm UTC](https://forum.ansible.com/t/foreman-integration-with-ansible-your-thoughts/19618/3 "2015-10-27T15:53:26Z")

</div>

Interesting - is something like this what you’re referring to?

[https://github.com/johanwiren/ansible-factcache](https://github.com/johanwiren/ansible-factcache)

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [October 27, 2015, 3:57pm UTC](https://forum.ansible.com/t/foreman-integration-with-ansible-your-thoughts/19618/4 "2015-10-27T15:57:53Z")

</div>

no, [https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/cache](https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/cache)  
\<= these are independent of callbacks and also allow for ansible to  
not only publish but retrieve.
