Agent Installation using Ansible
When installing Agent, the current Ansible Playbook/Role shall be used. “Awide Labs Ltd” LLC provides an Ansible role for automating Agent’s lifecycle (installation/update/configuration).
Requirements for Ansible playbook operation
The following components shall be installed on all nodes specified in the inventory file:
Python3 with pip module >= 3.10.0;
Database AwideDB or PostgreSQL, including postgresql-contrib, externally managed by Patroni or without external management.
On the node from which the playbook will be launched, Ansible >= 9.5.0 shall be installed, with core version 2.16.
Running Ansible playbook
Prior to running the Ansible playbook, complete the following steps:
Download the Ansible role from the link.
Populate the inventory file based on inventory_template file.
Create and place a new file in the group_vars directory containing variables for the group of nodes from the inventory file. For example, the file sample_group.yml for the group sample_group from inventory_template. Use the file group_vars/all.yml as a template.
Fill the created file with data relevant to running the playbook.
If necessary, specify the public key of the user under which Platform is launched in file roles/tantor_agent/files/id_rsa.pub. This key will be added to the postgres user.
If you need to predefine variables at the node level, add a file named after that node with the .yml extension in the host_vars directory. For example, the file hostnameA.yml from inventory_template.
Replace the value of sample_group in Agent.yml file with the group specified in the inventory file for which all tasks will be executed.
Note
The logic of the Ansible playbook is configured in the main variables file — group_vars/<file created in step three above>.yml
The playbook shall be run under a user with passwordless access to all nodes in the inventory file with the ability to switch to privileged mode (root).
To update Agent, run the Ansible playbook. To do this, use the command:
ansible-playbook -i <path to the inventory file> -l <group of nodes from the inventory file> agent.yml -D