<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[CloudForms Now]]></provider_name><provider_url><![CDATA[http://cloudformsblog.redhat.com]]></provider_url><author_name><![CDATA[Victor Estival Lopez]]></author_name><author_url><![CDATA[https://cloudformsblog.redhat.com/author/vestival271017/]]></author_url><title><![CDATA[Ansible Custom Buttons in CloudForms (Part 1 configuring the&nbsp;environment)]]></title><type><![CDATA[link]]></type><html><![CDATA[<h1><span style="font-weight:400;">Introduction</span></h1>
<p><span style="font-weight:400;">This series is highlighting the improvements and new capabilities introduced with CloudForms 4.6 about Ansible Custom Buttons.</span></p>
<p><span style="font-weight:400;">The Ansible Playbook used in this example will install a user-specified package on the selected virtual machine.</span></p>
<p><!--more--></p>
<h1><span style="font-weight:400;">Versions Tested</span></h1>
<ul>
<li style="font-weight:400;"><span style="font-weight:400;">CloudForms 4.6</span></li>
</ul>
<h2><span style="font-weight:400;">Adding a Repository</span></h2>
<p><span style="font-weight:400;">The sample playbooks needed for this article can be found in the following GIT repository.</span></p>
<p><a href="https://github.com/cbolz/ansible-playbooks.git"><span style="font-weight:400;">https://github.com/cbolz/ansible-playbooks.git</span></a></p>
<p><span style="font-weight:400;">Add the repository by navigating to </span><b>Automation, Ansible, Repositories</b><span style="font-weight:400;"> and then click on </span><b>Configuration, Add a new Repository</b></p>
<p><img data-attachment-id="2433" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/add-new-ansible-repository/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/add-new-ansible-repository.png" data-orig-size="406,158" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="add-new-ansible-repository" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/add-new-ansible-repository.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/add-new-ansible-repository.png?w=406" class="alignnone size-full wp-image-2433" src="https://cloudformsredhat.files.wordpress.com/2018/05/add-new-ansible-repository.png" alt="" /></p>
<p><span style="font-weight:400;">Fill out the form with the correct a name, description and the correct link. SCM credentials are not needed since this is a public repository. </span></p>
<p><img data-attachment-id="2434" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/add-a-new-repository-for-ansible/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/add-a-new-repository-for-ansible.png" data-orig-size="731,442" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="add-a-new-repository-for-ansible" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/add-a-new-repository-for-ansible.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/add-a-new-repository-for-ansible.png?w=731" class="alignnone size-large wp-image-2434" src="https://cloudformsredhat.files.wordpress.com/2018/05/add-a-new-repository-for-ansible.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/add-a-new-repository-for-ansible.png 731w, https://cloudformsredhat.files.wordpress.com/2018/05/add-a-new-repository-for-ansible.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/add-a-new-repository-for-ansible.png?w=300 300w" sizes="(max-width: 731px) 100vw, 731px" /></p>
<p><span style="font-weight:400;">After clicking on </span><b>Add</b><span style="font-weight:400;"> the import is running in the background and it can take a few moments to complete. </span></p>
<p><span style="font-weight:400;">You can view the status of adding the repository by clicking on your username in the top right corner and then </span><b>Tasks, All Tasks.</b></p>
<p><img data-attachment-id="2435" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/screen-shot-2018-05-28-at-13-47-14/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png" data-orig-size="1872,610" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-05-28 at 13.47.14" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png?w=1024" class="alignnone size-large wp-image-2435" src="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-47-14.png 1872w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight:400;">The repository will automatically refresh and sync the playbooks to CloudForms.</span></p>
<p><span style="font-weight:400;">You can view the repository by clicking </span><b>Automation, Ansible, Repositories:</b></p>
<p><img data-attachment-id="2436" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/list-of-ansible-repositories/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png" data-orig-size="901,111" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="list-of-ansible-repositories" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png?w=901" class="alignnone size-large wp-image-2436" src="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png 901w, https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/list-of-ansible-repositories.png?w=768 768w" sizes="(max-width: 901px) 100vw, 901px" /></p>
<p><span style="font-weight:400;">Click the repository you will see the inventory details of the repository.</span></p>
<p><img data-attachment-id="2437" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/details-ansible-repository/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png" data-orig-size="860,585" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="details-ansible-repository" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png?w=860" class="alignnone size-large wp-image-2437" src="https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png 860w, https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/details-ansible-repository.png?w=768 768w" sizes="(max-width: 860px) 100vw, 860px" /></p>
<p><span style="font-weight:400;">You can also view the list of playbooks by clicking the Playbooks field.</span></p>
<p><img data-attachment-id="2438" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/list-of-playbooks/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png" data-orig-size="954,151" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="list-of-playbooks" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png?w=954" class="alignnone size-large wp-image-2438" src="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png 954w, https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/list-of-playbooks.png?w=768 768w" sizes="(max-width: 954px) 100vw, 954px" /></p>
<p><span style="font-weight:400;">Finally, you can select a playbook and view its details too by clicking its row in the list.</span></p>
<p><img data-attachment-id="2440" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/details-of-playbook/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png" data-orig-size="851,302" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="details-of-playbook" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png?w=851" class="alignnone size-large wp-image-2440" src="https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png 851w, https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/details-of-playbook.png?w=768 768w" sizes="(max-width: 851px) 100vw, 851px" /></p>
<h2><span style="font-weight:400;">Creating Credentials</span></h2>
<p><span style="font-weight:400;">For Ansible to be able to log into the selected Virtual Machine, the login credentials have to be stored in CloudForms. </span></p>
<p><span style="font-weight:400;">Navigate to </span><b>Automation, Ansible, Credentials </b><span style="font-weight:400;">and click on </span><b>Configuration, Add New Credentials.</b></p>
<p><img data-attachment-id="2441" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/configuration-add-new-credentials/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/configuration-add-new-credentials.png" data-orig-size="321,129" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="configuration-add-new-credentials" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/configuration-add-new-credentials.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/configuration-add-new-credentials.png?w=321" class="alignnone size-full wp-image-2441" src="https://cloudformsredhat.files.wordpress.com/2018/05/configuration-add-new-credentials.png" alt="" /></p>
<p><span style="font-weight:400;">The example below is using the user root to log into the Virtual Machine. Best practice is to create dedicated accounts CloudForms can login with and use privilege escalation when needed.</span></p>
<p><img data-attachment-id="2442" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/ansible-credentials/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png" data-orig-size="844,510" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ansible-credentials" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png?w=844" class="alignnone size-large wp-image-2442" src="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png 844w, https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/ansible-credentials.png?w=768 768w" sizes="(max-width: 844px) 100vw, 844px" /></p>
<p><span style="font-weight:400;">Click on </span><b>Add</b><span style="font-weight:400;"> to save the credentials. Like most actions in CloudForms, this is performed in the background and will take a moment. A pop-up notification will inform you about the success.</span></p>
<h2><span style="font-weight:400;">Creating a Service</span></h2>
<p><span style="font-weight:400;">Although this has been </span><span style="font-weight:400;">explained</span><span style="font-weight:400;"> a number of times in the blog, as a reminder, to be able to create a custom button which executes an Ansible Playbook, we have to create a service catalog item first. This service catalog item will not be presented to end users and will not be visible in the catalog.</span></p>
<p><span style="font-weight:400;">First, we need to create a Catalog to store the service in (assuming this is a brave new environment), do this by clicking </span><b>Services, Catalogs </b><span style="font-weight:400;">and then </span><b>Catalogs </b><span style="font-weight:400;">in the accordion on the left. Create a new Catalog by clicking on the </span><b>Configuration </b><span style="font-weight:400;">button and selecting </span><b>Add New Catalog</b><span style="font-weight:400;">.</span></p>
<p><img data-attachment-id="2443" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/screen-shot-2018-05-28-at-13-56-39/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png" data-orig-size="1918,336" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-05-28 at 13.56.39" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png?w=1024" class="alignnone size-large wp-image-2443" src="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-39.png 1918w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight:400;">Create a new catalog as follows;</span></p>
<p><img data-attachment-id="2444" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/screen-shot-2018-05-28-at-13-56-14/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png" data-orig-size="1858,758" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-05-28 at 13.56.14" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png?w=1024" class="alignnone size-large wp-image-2444" src="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-13-56-14.png 1858w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight:400;">Click Add</span></p>
<p><span style="font-weight:400;">Now select </span><b>Catalog Items</b><span style="font-weight:400;">, </span><b>Samples</b><span style="font-weight:400;"> and create new by clicking </span><b>Configuration</b><span style="font-weight:400;"> button and selecting </span><b>Add New Catalog Item</b><span style="font-weight:400;">.</span></p>
<p><img data-attachment-id="2445" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/screen-shot-2018-05-28-at-14-10-56/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png" data-orig-size="1922,400" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-05-28 at 14.10.56" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png?w=1024" class="alignnone size-large wp-image-2445" src="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-10-56.png 1922w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight:400;">Select the Catalog Item Type as </span><b>Ansible Playbook</b></p>
<p><img data-attachment-id="2446" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/screen-shot-2018-05-28-at-14-12-37/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png" data-orig-size="1178,730" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-05-28 at 14.12.37" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png?w=1024" class="alignnone size-large wp-image-2446" src="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-12-37.png 1178w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight:400;">Fill out the new catalog item as follows for the Provisioning Tab.</span></p>
<p><img data-attachment-id="2447" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/ansible-service-catalog-item/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png" data-orig-size="1728,742" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ansible-service-catalog-item" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png?w=1024" class="alignnone size-large wp-image-2447" src="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/ansible-service-catalog-item.png 1728w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight:400;">Pay special attention to the following fields:</span></p>
<ul>
<li style="font-weight:400;"><span style="font-weight:400;">An extra variable package_name was added</span></li>
</ul>
<ul>
<li style="font-weight:400;"><span style="font-weight:400;">The machine credentials were set, in this example the previously created credentials were selected</span></li>
</ul>
<ul>
<li style="font-weight:400;"><span style="font-weight:400;">The dialog was set to </span><b>Create New </b><span style="font-weight:400;">and given a name.</span></li>
</ul>
<p>&nbsp;</p>
<p><span style="font-weight:400;">Click </span><b>Add</b><span style="font-weight:400;">.</span></p>
<p><span style="font-weight:400;">This Ansible Playbook has no retirement counterpart and the details in the respective </span><b>Retirement</b><span style="font-weight:400;"> dialog can be left unchanged.</span></p>
<p><img data-attachment-id="2448" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/catalog-item-created/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png" data-orig-size="1470,169" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="catalog-item-created" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png?w=1024" class="alignnone size-large wp-image-2448" src="https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/catalog-item-created.png 1470w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p><span style="font-weight:400;">The added catalog item also creates a new dialog to serve the item.</span></p>
<p><span style="font-weight:400;">You can click on the Service Catalog Item to verify the details:</span></p>
<p><img data-attachment-id="2449" data-permalink="https://cloudformsblog.redhat.com/2018/05/29/ansible-custom-buttons-in-cloudforms-part-1-configuring-the-environment/screen-shot-2018-05-28-at-14-19-40/" data-orig-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png" data-orig-size="1948,994" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="Screen Shot 2018-05-28 at 14.19.40" data-image-description="" data-medium-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?w=300" data-large-file="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?w=1024" class="alignnone size-large wp-image-2449" src="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?w=1024" alt="" srcset="https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?w=1024 1024w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?w=150 150w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?w=300 300w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?w=768 768w, https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png 1948w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>&nbsp;</p>
<p>Stay tuned for the next part</p>
]]></html><thumbnail_url><![CDATA[https://cloudformsredhat.files.wordpress.com/2018/05/screen-shot-2018-05-28-at-14-19-40.png?fit=440%2C330]]></thumbnail_url><thumbnail_width><![CDATA[440]]></thumbnail_width><thumbnail_height><![CDATA[225]]></thumbnail_height></oembed>