▶️ Ansible integration in Foreman
Ruby HTML Python Makefile Shell JavaScript
Clone or download
Latest commit ec84e8b Aug 14, 2018
Permalink
Failed to load latest commit information.
app Fixes #24525 - Replace notice with info in UI controller Aug 7, 2018
bin Fixes #15856 - support running playbook via proxy (#40) Sep 8, 2016
config update rubocop to 0.52 Dec 26, 2017
db Fixes #23742 - share all templates to all taxonomies Jun 14, 2018
extras Fix callback facts sending Aug 4, 2017
lib Release Core 2.1.2 Aug 14, 2018
locale Fixes #22860 - Extract the most recent strings from the plugin Mar 14, 2018
script Sync from community-templates Feb 26, 2018
test Fixes #24038 - fix host roles inheritance from hostgroup Jul 25, 2018
webpack Refs #22125 - Use react-json-tree for report json rendering Mar 7, 2018
.bablerc Refs #22125 - Use react-json-tree for report json rendering Mar 7, 2018
.codeclimate.yml Fixes #20464 - Allow arbitrary connection options host param Aug 1, 2017
.eslintignore Refs #22125 - Use react-json-tree for report json rendering Mar 7, 2018
.eslintrc Refs #22125 - Use react-json-tree for report json rendering Mar 7, 2018
.gitignore Refs #22125 - Use react-json-tree for report json rendering Mar 7, 2018
.rubocop.yml update rubocop to 0.52 Dec 26, 2017
.rubocop_todo.yml Fixes #22973 - add custom insights notification Mar 22, 2018
CHANGELOG Version 2.1.1 May 3, 2018
Contributors Version 2.1.1 May 3, 2018
Gemfile Fixes #15856 - support running playbook via proxy (#40) Sep 8, 2016
LICENSE Initial Ansible plugin template Oct 24, 2015
MANIFEST.in Add python setup script Feb 15, 2016
README.md Change Plugin Manual link to direct to parent page (#175) May 31, 2018
Rakefile Release 2.2.1 Jul 4, 2018
foreman_ansible.gemspec Fixes #24244 - add ipaddress dependency Jul 13, 2018
foreman_ansible_core.gemspec Unpin net-ssh completely Aug 7, 2018
package.json Refs #22125 - Use react-json-tree for report json rendering Mar 7, 2018
setup.py Add python setup script Feb 15, 2016

README.md

Code Climate Gem Version GPL License

Foreman Ansible ▶️

Reporting and facts import from Ansible to Foreman.

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 foreman_ansible_inventory

Documentation (installation and configuration)

Check out the official manual at theforeman.org

Registering a new host in Foreman

sign up gif

Host with failed and successful reports

reports

Assigning roles to a host and 'playing' them

role list role play multiple role play

Compatibility

Foreman Plugin
>= 1.9 0 - 0.3
>= 1.12 1.0 - TBD

Devs

The callback sends a POST request to /api/v2/hosts/facts with the format you can see in the API docs.

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 http://www.gnu.org/licenses/.