How to Install eG Agents on Linux Using Ansible?
For this, follow the steps below:
-
Login to the Ansible control node.
-
Next, proceed to push the eG agents to the Linux servers configured in the [remoteservers] section of the hosts file. For that, issue the following commands at the prompt, one after another, as a user with root user permissions to the target Linux systems:
# cd /root/ansible
# ansible-playbook egagent_linux_install.yaml
-
Upon successful execution, these commands will return the following messages:
-
From Figure 1, it is clear that when Ansible runs the YAML file, it first connects to the target Unix server using the IP address and credentials provided in the hosts file. Upon connecting successfully, Ansible then pushes the extracted Linux agent installables to the target. Next, since super-user permissions are required to run the iAgent script on the target, these permissions are automatically granted to the install user. The iAgent script is then silently run on the target to install the eG agent.
Troubleshooting
Ansible enables host key checking by default. Checking host keys guards against server spoofing and man-in-the-middle attacks, but it does require some maintenance.
If you understand the implications and wish to disable this behavior, you can do so by editing /etc/ansible/ansible.cfg or ~/.ansible.cfg:
[defaults]
host_key_checking = False
Alternatively, this can be set by the ANSIBLE_HOST_KEY_CHECKING environment variable:
# export ANSIBLE_HOST_KEY_CHECKING=False