This commit is contained in:
Miha Frangež 2025-09-20 13:41:12 +02:00
parent 36da67f369
commit c763b962ee
6 changed files with 46 additions and 52 deletions

View file

@ -19,7 +19,7 @@ predavalnice_pi:
# Nastavitve za vse posamezne predavalnice
hosts:
P01:
p01_controller:
room: P01
ansible_host: 192.168.192.42
static_ip: 192.168.192.42
@ -49,3 +49,34 @@ predavalnice_pi:
url: http://192.168.190.90:8091
roomId: 1
bearer_token: 0954afe1-4111-4f89-a123-fea08a55dc46
p22_controller:
room: P22
ansible_host: 192.168.192.43
static_ip: 192.168.192.43
# Novi barco projektorji
barco_G62:
- position: main
model: barco_G62
port: 3023
ip: 192.168.192.22
- position: side
model: barco_G62
port: 3023
ip: 192.168.192.23
tse_box:
projector_motors:
- position: main
i2c_address: 0x42
offset: 0 #for when using single 8 channel relay board
- position: side
i2c_address: 0x43
offset: 4
lucke:
url: http://192.168.190.90:8091
roomId: 2
bearer_token: b44c8cdc-d848-4b49-9deb-79023a60a62a

View file

@ -1,12 +1,11 @@
- name: Test playbook
vars:
# TODO: maybe don't hardcode this?
PROJECT_BASE: "../"
PROJECT_BASE: "../../"
INSTALL_BASE: "/home/pi/pyServices"
hosts:
- P01
- P22
- p01_controller
- p22_controller
handlers:
- name: restart NetworkManager
@ -58,8 +57,10 @@
- mosquitto
- nginx
state: latest
update_cache: true
- name: Install Poetry
become: true
pip:
break_system_packages: true
name:
@ -95,7 +96,7 @@
- name: Install controller scripts
ansible.posix.synchronize:
src: "../controller/"
src: "{{PROJECT_BASE}}/controller/"
dest: "{{INSTALL_BASE}}/"
delete: true
archive: false
@ -125,7 +126,7 @@
- name: Install frontend
become: true
ansible.posix.synchronize:
src: "../frontend/dist/"
src: "{{PROJECT_BASE}}/frontend/dist/"
dest: "/var/www/html/"
delete: true
archive: false

View file

@ -18,3 +18,10 @@ predavalnice_pi:
hostname: "p01_touch_display.local"
kiosk_url: "http://192.168.192.42?room=P01"
mqtt_host: "192.168.192.42"
p22_touch_display:
predavalnica: p22
static_ip: "192.168.192.112"
hostname: "p22_touch_display.local"
kiosk_url: "http://192.168.192.43?room=P22"
mqtt_host: "192.168.192.43"