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 # Nastavitve za vse posamezne predavalnice
hosts: hosts:
P01: p01_controller:
room: P01 room: P01
ansible_host: 192.168.192.42 ansible_host: 192.168.192.42
static_ip: 192.168.192.42 static_ip: 192.168.192.42
@ -49,3 +49,34 @@ predavalnice_pi:
url: http://192.168.190.90:8091 url: http://192.168.190.90:8091
roomId: 1 roomId: 1
bearer_token: 0954afe1-4111-4f89-a123-fea08a55dc46 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 - name: Test playbook
vars: vars:
# TODO: maybe don't hardcode this? PROJECT_BASE: "../../"
PROJECT_BASE: "../"
INSTALL_BASE: "/home/pi/pyServices" INSTALL_BASE: "/home/pi/pyServices"
hosts: hosts:
- P01 - p01_controller
- P22 - p22_controller
handlers: handlers:
- name: restart NetworkManager - name: restart NetworkManager
@ -58,8 +57,10 @@
- mosquitto - mosquitto
- nginx - nginx
state: latest state: latest
update_cache: true
- name: Install Poetry - name: Install Poetry
become: true
pip: pip:
break_system_packages: true break_system_packages: true
name: name:
@ -95,7 +96,7 @@
- name: Install controller scripts - name: Install controller scripts
ansible.posix.synchronize: ansible.posix.synchronize:
src: "../controller/" src: "{{PROJECT_BASE}}/controller/"
dest: "{{INSTALL_BASE}}/" dest: "{{INSTALL_BASE}}/"
delete: true delete: true
archive: false archive: false
@ -125,7 +126,7 @@
- name: Install frontend - name: Install frontend
become: true become: true
ansible.posix.synchronize: ansible.posix.synchronize:
src: "../frontend/dist/" src: "{{PROJECT_BASE}}/frontend/dist/"
dest: "/var/www/html/" dest: "/var/www/html/"
delete: true delete: true
archive: false archive: false

View file

@ -18,3 +18,10 @@ predavalnice_pi:
hostname: "p01_touch_display.local" hostname: "p01_touch_display.local"
kiosk_url: "http://192.168.192.42?room=P01" kiosk_url: "http://192.168.192.42?room=P01"
mqtt_host: "192.168.192.42" 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"

View file

@ -1,14 +0,0 @@
[globals]
room = 'P01'
mqttIp = 'localhost'
mqttPort = '1883'
[barco.novi.glavni]
ip = '192.168.192.12'
port = '3023'
[barco.novi.stranski]
ip = '192.168.192.16' # or smth
port = '3023'

View file

@ -1,11 +0,0 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.12"

View file

@ -1,20 +0,0 @@
{
"_meta": {
"hash": {
"sha256": "702ad05de9bc9de99a4807c8dde1686f31e0041d7b5f6f6b74861195a52110f5"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.12"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {},
"develop": {}
}