How do I roll out SapphireIMS agents to Linux/MAC machines in bulk?

While there is an option available to roll out agents using SapphireIMS SSH Interface, if you are looking for other tools, Ansible can be used.

The pre-requisites for using this tool is -
1. Ansible setup from where deployment should start : This can be installed in any of Linux or MAC machine, preferable to use Linux. Please note that If Red hat is available, they come with some specific version which has Ansible installed by default.
2. Target nodes where SapphireIMS agent needs to be installed: Basically we need SSH profile to communicate with target nodes by Ansible. If the target machines is configured with finger printing( when we use username/password), then either we need add finger printing for each target machine in known_host file of Ansible machine OR use key file( Authorized key) for SSH communication. Please note that permission(root/sudo) should be there to execute the below mentioned steps.

Target node list population in Ansible setup:
Ansible provides two ways to populate the node list which called as inventory with respect to Ansible, if required we can make the node list with sections such as WEB SERVERS, DATABASE SERVERS, etc.

  • Static : In this case, we explicitly add all the targets manually in inventory file
  • Dynamic : In this case, we can leverage some patterns like IP subnet to populate the targets in automatic way

Aside, we need to mention SSH profile getting used.

Action to be done by Ansible:
To deploy the SapphireIMS agent, Ansible tool has to perform set of activities and the relevant steps needs to be recorded in YML/YAML file which is called as playbook. Simple steps are:
a. Create directory if not exist in remote machine
b. Copy the agent ZIP file to remote machine and extract it
c. Use SapphireIMS agent installation script to install the agent

I have added sample inventory host file with username/password as SSH profile and one target node with IP ( Not used dynamic pattern). This is just sample(remove the txt extension while using) and we may have to revisit the scripts depending on the use case.
Inventory host file:
hosts.txt (1.1 KB)

Playbook :
sapphire.yml.txt (928 Bytes)

How to run the playbook in Ansible:
Please use command - ansible-playbook /home/workplace/sapphire.yml ( Please note that exact location of YML file needs to be provided and YML file name can be different)