Introduction

Ansible is a popular configuration automation tool that helps to automate infrastructure processes without exposing credentials. The Ansible integration helps IT administrators and process analysts to create Ansible playbooks to automate the administration tasks and commands. Integrating Ansible with OpsRamp helps to do agentless automation tasks for process workflows.

The Ansible integration is available only at the client level.

Target users: Client administrators and process analysts

Why use Ansible integration?

The Ansible integration enables the following:

  • Automating workflows using SSH without installing agents on all the remote systems.
  • Performing auto-remediation actions.
  • Scheduling tasks.
  • Executing an ad hoc workflow.

Integrating Ansible with OpsRamp

The Ansible integration involves installing Ansible and creating playbooks. One Ansible integration can have multiple playbooks. Every playbook represents an automation script in the YAML format. The playbook is assigned to a process automation workflow to execute the related automation tasks.

Prerequisites

  • Install Ansible on one of the servers in a specific environment (Ansible Control Node).
  • Verify if the target managed nodes and hosts are accessible through SSH with the Ansible Control Node.
  • Copy the full path of each Ansible script with the file name to create a playbook.
  • Allow OpsRamp URL in the Ansible server to download all the latest Agent packages. To download, go to the OpsRamp Console and navigate to Setup > Downloads > Agent.
  • Sudo permissions are required for the device user.
  • Navigate to Infrastructure > Resources and verify if the Ansible Control Node is visible and active.

Configure Ansible integration

Install the Ansible integration directly from the OpsRamp console. Before starting the installation, verify if the host name and Ansible server are visible on the Infrastructure > Resources page.

  1. Click All Clients, select a client.

  2. Click Setup > Account.

  3. Select the Integrations tile.

  4. The Installed Integrations screen is displayed, with all the installed applications. Click + ADD on the Installed Integrations page.

  5. If you do not have any installed applications, you will be navigated to the Available Integrations page. The Available Integrations page displays all the available applications along with the newly created application with the version.
    Note: Search for the application using the search option available. Alternatively, use the All Categories option to search.

  6. Click +Add on the Ansible tile.

    Custom Automation - Ansible Configure screen

    BASIC DETAILS: Enter the following information:

    Table Note
    Field NameField TypeDescription
    NameStringEnter a name for the integration.
    Example: Ansible playbook automation.
    Controller Host NameDropdownSelect a name from the available options. The drop-down list displays Ansible Control nodes configured with an OpsRamp agent.

    Add playbooks Add one or more playbooks. One playbook can execute only one automation script.
    Example: Find ipconfig details.

    Prerequisite: Keep handy the name and complete path of the script required for creating a playbook.

    PLAYBOOK: Click ADD in the PLAYBOOK section and enter the following information in the ADD PLAYBOOK dialog box.

    Field NameField TypeDescription
    NameStringProvide a name for the playbook.
    Example: Check Server.
    Full Qualified PathStringEnter the complete path of the script.
    input(Optional)StringEnter more parameters for the script.
  7. Click ADD PLAYBOOK.

The playbook is added and displayed in the PLAYBOOK section.

  • An integration can have one or more playbooks. To add more playbooks, click ADD.
  • To update an existing playbook, click the menu (three dots) icon and select Edit.
  • To delete a playbook, click the menu (three dots) icon and select Remove.
  1. Click FINISH.

The playbook added with the installed integration is ready to use in a process workflow.

Actions on Integration

You can perform actions like Export, Edit, and Uninstall on the integration.

Using Ansible integration

The installed Ansible integration is used while creating business process workflows. See Getting Started with Process Definition for more information.

Note: Verify if the installed integration is active.

Using Ansible Playbook in Process Automation workflow