integrations

Run Ansible Playbooks from Middleware Admin

Author: Vasil Vasilev
October 11, 2024

Middleware Admin aims to streamline automation processes on Middleware servers, providing clarity on tasks that have been performed.
Our guiding principle is straightforward: Keep It Simple.
In the Automation section, we've introduced a new module - Ansible Playbooks.
This module enables you to create and execute Ansible Playbooks on connected servers within Middleware Admin.

Define Server remote Connection

You can view the list of servers for which you can establish a special Remote connection in Inventory -> Servers.
These are the servers your group is responsible for.
Ensure you add the correct connection details:
- if it is SSH connection - user/password or private/public keys
- if it is Windows - winrm configuration
- if it is zOS - SSH parameters (dont forget to add ansible_python_interpreter: python_binary_on_zos_target in the inventory file in Ansible Playbooks section)





On selected server - navigate to Remote access:




Setting Up Ansible Playbooks

Navigate to Automation -> Ansible Playbooks -> Add New Playbook.





Write your playbook in YAML format. Ensure it is valid; if there are any errors, Middleware Admin will highlight the specific line that needs correction.
We leverage JSLint and CodeMirror for visualization and validation.

Specify the application code. This ensures that colleagues with access rights (e.g., UnixAdmin) can view and edit the playbook.
Once the playbook is saved, you can define and the Inventory data:






Create Ansible Job:

Navigate to Ansible Jobs Overview -> Add Job.
Select the server on which you wish to run the playbook, choose the playbook, and set the start time.




In the overview page, you can see a list of jobs. If you execute the same playbook again, a new job will be created.
You can decide to use the same playbook or update it before running.



If you start one Playbook again, a new Job will be created. You can decide to start with the same Playbook or to read the Playbook if you have changed something and then to run.

This is happening when you select the Job :





By following these steps, you can efficiently automate processes and maintain clarity on the tasks performed.
Middleware Admin simplifies managing your Middleware servers, ensuring a seamless experience.