WORKLOAD AUTOMATION COMMUNITY
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
  • About
  • Contact
  • What's new

The power of Ansible inside Workload Automation

9/28/2020

0 Comments

 
Picture
Can’t get enough of automating your business processes? We have what you are looking for! 
 
The Ansible plug-in is available on Automation Hub, download it to empower your Workload Automation environment.  
 
Adding the Ansible plug-in, you can monitor all your Ansible processes directly from the Dynamic Workload Console. Furthermore, you can schedule when executing the Ansible playbooks, just creating a simple job definition. 
Before starting to use the plug-in, you need to install Ansible on the same machine where the dynamic agent that runs the Ansible job is installed. You also need to setup the SSH protocol to communicate with Ansible. 
 
Let’s demonstrate, through an example, how easy is to patch remote nodes with the Ansible plug-in. 
 
  1. Job definition ​
Picture
Picture
  • First, we need the code to patch the remote nodes, and usually it is written through a yum module in a yaml file. This kind of file is called playbook.yml, and we can add it by using the playbook path field.  In the field we need to enter the absolute path to the playbook.yml file; we can use the Search button to search such path in the dynamic agent's file system. The content of the file is the following: 
 
--- 
- hosts: all 
  name: Update packages 
  tasks: 
    - name: Update 
      yum:  
        name: " {{ module_name }} " 
        state: latest 
 
  • Then we need to valorize the variable “module_name” as an extra argument to correctly execute the playbook. Thus, in the Environment variables section we insert, for example, “module_name” in the Name column and an asterisk (*) in the Value column. 
    The asterisk indicates that Ansible will update all modules found on the target machine. 
 
  • Next, we need to specify the remote nodes to which Ansible should connect. The file with the targets' list is called inventory and the Inventory section contains the path to such file (or files, since Ansible can consider multiple inventories at once). The Search inventories button allows to search for such paths in the file system of the dynamic agent, starting from the path written just above the button.  
    We want to update modules on localhost and on a remote machine, so our inventory file content is as follows: 
 
[LOCAL] 
localhost ansible_connection=local 
[REMOTE] 
node_name ansible_ssh_user=<username> ansible_ssh_host=<ip> 
 
 
We configured all necessary fields to make Ansible work, but if we want, we can also configure some additional options, such as: 
 
  • Check for unreachable hosts before running: when this option is selected, the plug-in forces Ansible to execute the ping module towards all hosts. If at least one host is unreachable, the plug-in stops and ends in error showing the list of unreachable hosts. If all hosts are reachable, the playbook execution starts. 
 
  • The Inventory content field gives the possibility to write an inventory directly in the job definition, without the need for a file stored in the file system of the dynamic agent. 
 
  • The ansible-playbook command accepts some additional parameters that can be written in the Other parameters field. For example, the --verbose parameter is used to get a more verbose output. 
​
 2. Monitoring ​
Picture
While Ansible executes the playbook, the plug-in offers the possibility to monitor in real-time its execution. Such monitor page, called Workflow details, is accessible from the monitor jobs view and contains details of each task that Ansible has executed up to a particular point. Refresh the page to see the updates and click on the showAdditionalInfo button to get more details about a specific task. 
 
Thus, thanks to the Ansible plug-in, you can automate your playbooks and monitor all your processes running on Ansible, all from one place. 
 
On Automation Hub we have this and so many other integrations that will enable you to automate everything you want. 
Automate more, automate better! 
Author's Bio
Picture
Maria Ludovica Costagliola, Workload Automation Junior Software Developer

She joined HCL in September 2019 as Junior Software Developer starting to work as Developer for IBM Workload Automation product suite. She has a Computer Engineering Master Degree.   ​
Picture
Agnese Berellini, HCL Workload Automation

Agnese is an enthusiastic information developer from Italy. She likes to analyze new features, describe them and improve her knowledge about technical components. When she doesn’t have to deal with developers and software, she loves spending her time traveling around the world. 
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Archives

    March 2025
    February 2025
    January 2025
    December 2024
    November 2024
    October 2024
    September 2024
    August 2024
    July 2024
    June 2024
    May 2024
    April 2024
    March 2024
    February 2024
    January 2024
    October 2023
    August 2023
    July 2023
    June 2023
    May 2023
    April 2023
    March 2023
    February 2023
    January 2023
    December 2022
    September 2022
    August 2022
    July 2022
    June 2022
    May 2022
    April 2022
    March 2022
    February 2022
    January 2022
    December 2021
    October 2021
    September 2021
    August 2021
    July 2021
    June 2021
    May 2021
    April 2021
    March 2021
    February 2021
    January 2021
    December 2020
    November 2020
    October 2020
    September 2020
    August 2020
    July 2020
    June 2020
    May 2020
    April 2020
    March 2020
    January 2020
    December 2019
    November 2019
    October 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    July 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    June 2017
    May 2017

    Categories

    All
    Analytics
    Azure
    Business Applications
    Cloud
    Data Storage
    DevOps
    Monitoring & Reporting

    RSS Feed

www.hcltechsw.com
About HCL Software 
HCL Software is a division of HCL Technologies (HCL) that operates its primary software business. It develops, markets, sells, and supports over 20 product families in the areas of DevSecOps, Automation, Digital Solutions, Data Management, Marketing and Commerce, and Mainframes. HCL Software has offices and labs around the world to serve thousands of customers. Its mission is to drive ultimate customer success with their IT investments through relentless innovation of its products. For more information, To know more  please visit www.hcltechsw.com.  Copyright © 2024 HCL Technologies Limited
  • Home
  • Blogs
  • Forum
  • Resources
  • Events
  • About
  • Contact
  • What's new