Pre-requisites for Uninstalling eG Agent on Linux Using Ansible
The pre-requisites for uninstalling Linux agents using Ansible are as follows:
-
One/more Managed nodes, a Control node, and an Ansible Tower should be configured as part of the Ansible installation in your environment;
-
Create the following folders on the Ansible control node:
-
A folder named ansible in the root directory of the node;
-
A folder named egagent in the tmp folder of the node
-
-
The Ansible Control Node should be configured with the IP address and connection details of the remote Linux systems from which the eG agents are to be uninstalled. For this, follow the steps below:
-
Login to the Ansible Control Node.
-
Edit the /etc/ansible/hosts file therein. This file should be updated with the following details:
-
The IP addresses of each of the remote Linux servers/systems from which the eG agent has to be uninstalled;
-
The details of how to connect to every server via SSH
-
-
To configure these details, first search for the [remoteservers] section in the /etc/ansible/hosts file. Under this section, provide the details of each remote Linux server in the following format:
[remoteservers]
<IPadress_of_Linux_server1> <Credentials_for_connecting_to_Linux_server1>
<IPadress_of_Linux_server2> <Credentials_for_connecting_to_Linux_server2>
For instance, if the SSH connection to a server uses Password authentication, then your specification will be:
192.168.10.21 ansible_ssh_pass=password ansible_ssh_user=root
If the SSH connection uses key-based authentication, then your specification will be:
192.168.2.200 ansible_ssh_private_key_file=/path/to/your/.ssh/id_rsa.pub
-
Finally, save the file.
-