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 plugin. 

 

  1. Job definition 

 

  • 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 plugin forces Ansible to execute the ping module towards all hosts. If at least one host is unreachable, the plugin 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 

While Ansible executes the playbook, the plugin 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:

Maria Ludovica Costagliola, Workload Automation Junior Software Developer

Maria  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.    

 

 

Agnese Berellini, Information Developer for HCL Workload Automation

Agnese is a very enthusiastic developer. 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 travelling around the world. 

Comment wrap
Further Reading
article-img
Automation | June 20, 2022
The Dynamic Workload Console is the one-stop automation platform for users across the business
The Dynamic Workload Console (DWC) has become a core platform for workload automation, providing visibility into everything all in one place.“The designing of a job stream is a key operation for schedulers and application developers to or interconnect business applications and achieve governance and control,” Zaccone said. “Our idea with the new Workload Designer is to empower what we had and push it to an advanced level to provide everything is needed to our customers.” 
article-img
Automation | May 24, 2022
Ensuring Passwordless Job Schedulation with CyberArk Integration
CyberArk is an identity and access manager offering a wide set of identity security capabilities. You can use it to submit Workload Automation jobs without specifying any passwords, which are retrieved from the CyberArk vault.
article-img
Automation | May 19, 2022
Continuous Security and Quality Updates on Dynamic Workload Console 10.1
After the biggest launch of Workload Automation 10.0.1 release in 1Q of 2022 (see the Workload automation original Video), what can we expect in 2022? Big news! Our first release refreshing for Dynamic Workload Console 10.0.1 is ready. Let’s answer the 5 WH questions.
Close
Filters result by
Sort:
|