Task #2275
closed 
  Try foreman with the ansible plugin as an ansible console
100%
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
Related issues
       Updated by Andrea Dell'Amico over 9 years ago
      Updated by Andrea Dell'Amico over 9 years ago
      
    
    - Status changed from New to In Progress
       Updated by Andrea Dell'Amico over 9 years ago
      Updated by Andrea Dell'Amico over 9 years ago
      
    
    There's a simple role to install all the required stuff.
       Updated by Andrea Dell'Amico over 9 years ago
      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.
       Updated by Andrea Dell'Amico over 9 years ago
      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.
       Updated by Andrea Dell'Amico over 9 years ago
      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
       Updated by Andrea Dell'Amico over 9 years ago
      Updated by Andrea Dell'Amico over 9 years ago
      
    
    - File foreman_callback.py foreman_callback.py added
What's needed to enable the foreman callback on your own desktop:
- Edit the ansible global configuration file. /etc/ansible/ansible.cfgon Linux,/opt/local/etc/ansible/ansible.cfgon OSX, to add the following line on the defaults section (ensure that no othercallback_pluginsentry is present):
callback_plugins = ~/.ansible/plugins/callback_plugins bin_ansible_callbacks = True
- Install the attached file as `~/.ansible/plugins/callback_plugins/foreman_callback.py 
- Install the python - requestsmodule from pip. The one provided by packages is not new enough.
- 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
       Updated by Andrea Dell'Amico over 9 years ago
      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.
       Updated by Andrea Dell'Amico over 9 years ago
      Updated by Andrea Dell'Amico over 9 years ago
      
    
    - Related to Task #2720: Explore rundeck as a better alternative to foreman added
 
  
  