Introducing Ansible Tower Integration in CloudForms 4.1

Ansible Tower is a management tool designed to help automate infrastructure operations. Ansible Tower features management of host inventory, Ansible playbooks, access keys and passwords, as well as detailed reporting and audit of infrastructure deployments. Ansible Tower is designed for team-based infrastructure management, and as such, facilitates user’s involvement at different levels of the infrastructure operations. It enhances basic Ansible CLI operations with a visual overview of the infrastructure states and provides management workflows across the enterprise. Using Ansible Tower, users can schedule Ansible playbook runs and monitor current and historical results, allowing for troubleshooting or identification of issues before they occur.
 

 
The latest 4.1 release of Red Hat CloudForms provides an out-of-the-box integration to Ansible Tower. Ansible Tower is configured and presented as a Configuration Management provider in the same form and location as Red Hat Satellite 6. Once configured, the integration provides visibility in CloudForms of the Ansible Tower inventory, including hosts and job templates.
 

( function() {
var func = function() {
var iframe_form = document.getElementById(‘wpcom-iframe-form-672c677f374bdb7c2c7fd975c07eb5f7-57a481bcc88ef’);
var iframe = document.getElementById(‘wpcom-iframe-672c677f374bdb7c2c7fd975c07eb5f7-57a481bcc88ef’);
if ( iframe_form && iframe ) {
iframe_form.submit();
iframe.onload = function() {
iframe.contentWindow.postMessage( {
‘msg_type': ‘poll_size’,
‘frame_id': ‘wpcom-iframe-672c677f374bdb7c2c7fd975c07eb5f7-57a481bcc88ef’
}, window.location.protocol + ‘//wpcomwidgets.com’ );
}
}

// Autosize iframe
var funcSizeResponse = function( e ) {
var origin = document.createElement( ‘a’ );
origin.href = e.origin;

// Verify message origin
if ( ‘wpcomwidgets.com’ !== origin.host )
return;

// Verify message is in a format we expect
if ( ‘object’ !== typeof e.data || undefined === e.data.msg_type )
return;

switch ( e.data.msg_type ) {
case ‘poll_size:response':
var iframe = document.getElementById( e.data._request.frame_id );

if ( iframe && ” === iframe.width )
iframe.width = ‘100%';
if ( iframe && ” === iframe.height )
iframe.height = parseInt( e.data.height );

return;
default:
return;
}
}

if ( ‘function’ === typeof window.addEventListener ) {
window.addEventListener( ‘message’, funcSizeResponse, false );
} else if ( ‘function’ === typeof window.attachEvent ) {
window.attachEvent( ‘onmessage’, funcSizeResponse );
}
}
if (document.readyState === ‘complete’) { func.apply(); /* compat for infinite scroll */ }
else if ( document.addEventListener ) { document.addEventListener( ‘DOMContentLoaded’, func, false ); }
else if ( document.attachEvent ) { document.attachEvent( ‘onreadystatechange’, func ); }
} )();

 
With this integration, Red Hat CloudForms leverages the automation capabilities of Ansible and extends its reach to third party applications, by re-using the large library of existing Ansible playbooks (see Ansible Galaxy).
Practically, the integration brings to CloudForms the following capabilities:

launch Ansible Job Templates from CloudForms Automate, such as Provisioning or Retirement State Machines, on a click of a button on a Host/VM, or as an action on a control policy
launch Ansible Job Templates from CloudForms Service Catalog as a Service Item or as part of a Service Bundle

We will explore each of these capabilities over the next blog posts. Stay tuned!
This is the first article of our series on Ansible Tower Integration in Red Hat CloudForms:

Part 1: Introducing Ansible Tower Integration in CloudForms 4.1
Part 2: Configuration of an Ansible Tower provider in CloudForms
Part 3: Launching our First Ansible Job Template on a VM in CloudForms
Part 4: Publishing an Ansible Job Template as a Service Catalog Item in CloudForms
Part 5: Using an Ansible Job Template Service Item in a CloudForms Service Bundle

Quelle: CloudForms

Published by