SevOne

SevOne

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only

Execute existing Ansible Playbook on a server 

Thu April 04, 2024 04:50 AM

Description:  The workflow opens a SSH session to a server running existing Ansible scripts.  The ansible script on the server is executed by the workflow using a shell command.  The workflow captures and parses the result of the Ansible script.  In this scenario, the Ansible playbook has a task to query the status of Ethernet interface eth1 on a VYOS router.  If the status of the interface is down, a Service Now ticket is opened and the output of the Ansible playbook is inserted in the details field of the SNOW ticket.

List of requirements:

RNA Version: 2024.1.497 or later

Ansible Server: Linux server running Ansible. 

ServiceNow:  Developer Version

Environment Required:

·        RNA:  needed to get the list of network devices

·        SSH server:  RNA needs to be able to SSH to the server.

o   Linux server UserID/Password for authentication

·        ServiceNow: Developer instance that will be used to open service incidents

Inputs:

  • SSH server IP address
  • Service Now instance login information

Setup:

  • Workflow: Opens an SSH session to the Linux server.
  • Workflow: Executes the Ansible playbook using a Shell command. 
  • Workflow: Parse the output and look for the status of the ethernet interface.
  • Workflow:  If the interface is down, log in to Service Now and open a new incident.

Instructions:

To Run the Workflow: 

·        Execute the workflow.

Expected results:

A message indicating the status of the interface is shown.

High-Level Workflow Overview

Statistics
0 Favorited
10 Views
1 Files
0 Shares
2 Downloads
Attachment(s)
zip file
RNA_ServerSSH_AnsiblePlaybook_2024-04-03_17_49_22.zip   1 KB   1 version
Uploaded - Thu April 04, 2024