Views: 6394
Last Modified: 02.09.2024
|
All configuration files, scenarios and other tools required ansible are stored in the directory /etc/ansible/ . |
Most important is description of hosts, managed by the Virtual Appliance. In the most simple case – it is a local server with the installed Bitrix environment.
- file /etc/ansible/hosts – or inventory file (configuration description) contains description of hosts that can be managed.
In case of Bitrix Virtual Appliance we store only groups and hosts that are included into these groups.
The file /etc/ansible/hosts is separated by groups. Groups have roles, executed by servers. The same server can be located in several groups.
Example:
# Bitrix VA default configuration group
[bitrix-hosts]
vm03 ansible_ssh_host=192.168.1.215
vm04 ansible_connection=local ansible_ssh_host=192.168.1.227
..
[bitrix-push]
vm03 ansible_ssh_host=192.168.1.215
The group [bitrix-hosts]
contains all hosts that can be managed.
The group [bitrix-push]
contains hosts that execute role of push server. In this example: server vm03 acts as the instant message server.
Attention! Do not add the same host via different
interfaces to the inventory!
- files in catalogs /etc/ansible/host_vars/ and /etc/ansible/group_vars/ – personal server and groups settings accordingly.
Example:
bx_connect: ipv4
bx_host: vm04
bx_hostname: vm04
bx_netaddr: 192.168.1.227