Ansible
Home > Administration > IT Operations Management > ITOM Package Library >Ansible | Index |
IntroductionA collection of operations to enable the automation of management of Ansible playbooks, inventories and hosts from Hornbill workflows. |
|
Target Environment Requirements
Credentials
Accounts used when executing jobs against operations contained within this package must adhere to the following requirements:
- No additional credentials are required. All authentication is provided though KeySafe on job creation.
KeySafe Configuration
When creating SIS jobs for operations contained within this package, they need to be run on the target machine as a user who has the correct privileges on the target.
To configure your Target Machine account authentication in KeySafe:
- In the Admin console, navigate to System > Security > KeySafe;
- Click on + then select
Username + Password
; - Give the KeySafe Key a Title (this is the name/identifier for the target machine account as you will see it when creating an IT Automation Job, or adding an IT Automation node to a Business Process or Runbook);
- Optionally add a description;
- Populate the Username field with the domain/local account username for the account being used on the target machine;
- Populate the Password field with the password for the above account;
- Select Create Key to save.
Once you have created your KeySafe Key, you can then use it when creating IT Automation Jobs from this package. See screenshots to the right for examples.
Package Operations
The Ansible package contains the following operations, than can be used to create ITOM Jobs directly, or included in your Business Processes and/or IT Operations Management Runbooks.
Run Playbook
This operation will execute a playbook within Ansible.
Input Parameters
inventoryPath
MANDATORY - Format /file-path/file-pathplaybookPath
MANDATORY - Format /file-path/file-path
Output Parameters
playbookResponse
The response from executing the specific playbook action.outcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
List Playbooks
This operation lists the contents of a playbook.
Input Parameters
NewUser
MANDATORY - Format /file-path/file-path
Output Parameters
playbookList
The contents of the playbook selectedoutcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
Create Inventory
Create an Inventory or Host group Text file.
Input Parameters
fileName
MANDATORY - Format /file-path/file-path
Output Parameters
fileName
The Created File Nameoutcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
List Inventory
This function will list the contents of an Playbook, Inventory or collection of host servers.
Input Parameters
inventoryPath
MANDATORY - Format: /file-name/file-name
Output Parameters
inventoryList
The returned response from the listoutcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
Remove Inventory
Removes an Playbook, Inventory or Host file from Ansible.
Input Parameters
inventoryPath
MANDATORY - Format /file-path/file-path
Output Parameters
outcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
Create A Host Group
Creates a host group within the designated file.
Input Parameters
hostFileName
MANDATORY - The path to the file that holds the specified Host Group. - Format /file-path/file-pathhostGroupName
MANDATORY - The desired Host Group name that you would like to create.hostName
MANDATORY - The IP address or name of the server you would like to add.
Output Parameters
fileName
The Successfully created Host Group Nameoutcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
List Host Groups
Displays all the Hosts Group titles within an inventory or host file.
Input Parameters
hostGroupPath
MANDATORY - The folder path to the Inventory / Host file that you would like to search for Host Groups within.
Output Parameters
HostGroup
outcome
The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
Remove A Host Group
Removes a host group and all hosts stored within it from an inventory or host file.
Input Parameters
fileName
MANDATORY - Please do not use any blank spaces - Format /file-path/file-pathhostGroupName
MANDATORY - Please do not use any blank spaces, provide the Host Group you would like to remove.
Output Parameters
filePath
outcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
Create A Host
Creates an instance of a host within the designated host group and inventory / host file.
Input Parameters
fileName
MANDATORY - The Path to the Inventory or Host file that holds the Host Group you would like to place the Host within. Format: /file-name/file-namehostGroupName
MANDATORY - The Name of the Host Group you would like to place the Host within.hostName
MANDATORY - The name or IP address of the Host
Output Parameters
fileName
outcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation
Remove A Host From A Host Group
Removes the specified host from a host group.
Input Parameters
fileName
MANDATORY - Please do not use any blank spaces - Format /file-path/file-pathhostGroupName
MANDATORY - Please do not use any blank spaces, provide the Host Group you would like to remove the Host fromhostName
MANDATORY - Please do not use any blank spaces, The name or IP address of the Host you would like removed.
Output Parameters
fileName
outcome
MANDATORY The outcome of the operation (OK/FAIL)errors
Any errors returned by the operation