- Added ansible/ directory with playbooks for: * deploy.yml: Update applications on devices from git * commands.yml: Execute arbitrary commands on devices * system_update.yml: OS updates and health checks * inventory.ini: Device and group configuration * README.md: Comprehensive Ansible guide * requirements.txt: Installation instructions - Added ansible_integration.py: Python module wrapping Ansible operations - Added utils_ansible.py: Updated utilities using Ansible instead of HTTP commands Key benefits: - Idempotent operations with error recovery - Comprehensive logging and backup - Multi-device orchestration - Better reliability and control - Replaces unreliable direct HTTP command execution
35 lines
917 B
INI
35 lines
917 B
INI
# Ansible Inventory for Prezenta Work Devices
|
|
# This inventory file manages all Raspberry Pi devices running prezenta_work
|
|
|
|
[all:vars]
|
|
# Common variables for all devices
|
|
ansible_user=pi
|
|
ansible_password=Initial01!
|
|
ansible_become=yes
|
|
ansible_become_method=sudo
|
|
ansible_become_password=Initial01!
|
|
ansible_python_interpreter=/usr/bin/python3
|
|
ansible_connection=ssh
|
|
|
|
[prezenta_devices]
|
|
# Raspberry Pi devices running the prezenta_work application
|
|
# Format: device_name ansible_host=192.168.1.x
|
|
|
|
device_1 ansible_host=192.168.1.20
|
|
device_2 ansible_host=192.168.1.21
|
|
device_3 ansible_host=192.168.1.22
|
|
|
|
[prezenta_devices:vars]
|
|
# Variables specific to prezenta devices
|
|
app_directory=/srv/prezenta_work
|
|
app_user=pi
|
|
app_service=prezenta
|
|
|
|
[monitoring_server]
|
|
# Central monitoring server
|
|
monitor ansible_host=192.168.1.103 ansible_user=root
|
|
|
|
[local]
|
|
# Local development/test
|
|
localhost ansible_connection=local ansible_become=no
|