https://github.com/theforeman/foreman_ansible
:arrow_forward: Ansible integration in Foreman
https://github.com/theforeman/foreman_ansible
ansible foreman hacktoberfest
Last synced: 6 months ago
JSON representation
:arrow_forward: Ansible integration in Foreman
- Host: GitHub
- URL: https://github.com/theforeman/foreman_ansible
- Owner: theforeman
- License: gpl-3.0
- Created: 2015-10-24T15:53:48.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2025-03-31T12:46:55.000Z (6 months ago)
- Last Synced: 2025-04-13T04:57:15.477Z (6 months ago)
- Topics: ansible, foreman, hacktoberfest
- Language: JavaScript
- Homepage:
- Size: 2.17 MB
- Stars: 213
- Watchers: 22
- Forks: 112
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: LICENSE
Awesome Lists containing this project
README
[](https://codeclimate.com/github/theforeman/foreman_ansible)
[](https://badge.fury.io/rb/foreman_ansible)
[](https://github.com/theforeman/foreman_ansible/blob/master/LICENSE)# Foreman Ansible :arrow_forward:
Reporting and facts import from Ansible to Foreman.
* Main website: [theforeman.org](https://theforeman.org)
* Plugin manual: [foreman_ansible manual](https://theforeman.org/plugins/foreman_ansible)
* ServerFault tag: [Foreman](https://serverfault.com/questions/tagged/foreman)
* Issues: [foreman ansible on Redmine](https://projects.theforeman.org/projects/ansible/issues)
* Chat and forum: [https://theforeman.org/support.html](https://theforeman.org/support.html)## Features
* Import facts
* Monitor playbook and Ansible runs runtime
* Sends Ansible reports to Foreman that contain what changed on your system after an ansible run.
* Stores a list of roles applicable to your hosts and 'plays' them
* Looking for an Ansible dynamic inventory for Foreman? Use [theforeman.foreman.foreman](https://github.com/theforeman/foreman-ansible-modules/blob/develop/plugins/inventory/foreman.py)## Documentation (installation and configuration)
Check out the official manual at [theforeman.org](http://theforeman.org/plugins/foreman_ansible/2.x/index.html)##### Registering a new host in Foreman
##### Host with failed and successful reports
##### Assigning roles to a host and 'playing' them


## Compatibility
| Foreman | Plugin |
| ---------------:| --------------:|
| >= 1.15 | 1.4 |
| >= 1.16 | 2.0 |
| >= 1.18 | 2.2 |
| >= 1.21 | 2.3 |### Devs
The callback sends a POST request to /api/v2/hosts/facts with the format you can see [in the API docs](http://theforeman.org/api/1.20/apidoc/v2/hosts/facts.html).
Facts must contain the output of `ansible -m setup $HOSTNAME`, plus a '_type' and '_timestamp' keys. You can see an example on test/fixtures/sample_facts.json in this repository.
After that request, you should have a host registered in Foreman with the Ansible facts. It takes into account some facter and ohai facts if these are available on the system as well.
## Copyright
Copyright (c) Daniel Lobato Garcia
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program. If not, see .