Project

General

Profile

Actions

Task #2275

closed

Try foreman with the ansible plugin as an ansible console

Added by Andrea Dell'Amico over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
_InfraScience Systems Engineer
Category:
System Application
Target version:
Start date:
Feb 16, 2016
Due date:
% Done:

100%

Estimated time:
Infrastructure:
Development, Pre-Production, Production

Description

It seems that is now possible to log the ansible activities using foreman: http://theforeman.org/plugins/foreman_ansible/0.x/index.html
simply configuring the service and installing a callback for ansible.


Files

foreman_callback.py (7.11 KB) foreman_callback.py Ansible foreman callback Andrea Dell'Amico, Mar 16, 2016 12:47 PM

Related issues

Related to D4Science Infrastructure - Task #2720: Explore rundeck as a better alternative to foremanClosed_InfraScience Systems EngineerMar 17, 2016

Actions
Actions #1

Updated by Andrea Dell'Amico over 9 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Andrea Dell'Amico over 9 years ago

There's a simple role to install all the required stuff.

Actions #3

Updated by Andrea Dell'Amico over 9 years ago

  • % Done changed from 0 to 20

Also to investigate:
http://code-complete.com/code/?p=40 https://github.com/ansible-semaphore/semaphore semaphore, a basic GUI for ansible
Rundeck, http://rundeck.org/index.html but it seems that supporting ansible will not be easy.

Actions #4

Updated by Andrea Dell'Amico over 9 years ago

  • % Done changed from 20 to 70

Foreman is working in some way. An ansible plugin is needed, instructions will follow.
shell.research-infrastructures.eu has the plugin already configured.

Actions #5

Updated by Andrea Dell'Amico over 9 years ago

I configured authentication against ldap, so everyone can authenticate. After the first authentication I (or another administration) can setup the correct roles. There's not ldap groups synchronization right now.
The URL is https://cm.research-infrastructures.eu

Actions #6

Updated by Andrea Dell'Amico over 9 years ago

What's needed to enable the foreman callback on your own desktop:

  1. Edit the ansible global configuration file. /etc/ansible/ansible.cfg on Linux, /opt/local/etc/ansible/ansible.cfg on OSX, to add the following line on the defaults section (ensure that no other callback_plugins entry is present):
callback_plugins   = ~/.ansible/plugins/callback_plugins
bin_ansible_callbacks = True
  1. Install the attached file as `~/.ansible/plugins/callback_plugins/foreman_callback.py

  2. Install the python requests module from pip. The one provided by packages is not new enough.

  3. Run ansible as usual, with a caveaut. If you are going to provision a host for the first time, a one time command is needed to add its data to foreman:

ansible -m setup -i <inventory file> <host or group name> --ask-vault-pass
Actions #7

Updated by Andrea Dell'Amico over 9 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 70 to 100

An alternative is to ask me or @tommaso.piccioli@isti.cnr.it for an access to shell.research-infrastructures.eu, where ansible and the foreman callback are already configured globally.

Actions #8

Updated by Andrea Dell'Amico over 9 years ago

  • Related to Task #2720: Explore rundeck as a better alternative to foreman added
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 8.91 MB)