/
/
/
1---
2# Doorbell Role - Main Tasks
3
4- name: Validate MQTT configuration
5 ansible.builtin.assert:
6 that:
7 - mqtt_host | default('') | length > 0
8 - mqtt_port | default(0) | int > 0
9 - mqtt_username | default('') | length > 0
10 - mqtt_password | default('') != 'CHANGE_ME'
11 - mqtt_password | default('') | length > 0
12 fail_msg: |
13 Missing or default MQTT configuration for doorbell.
14 Ensure mqtt_host, mqtt_port, mqtt_username, and mqtt_password are set
15 (mqtt_password must not be the default 'CHANGE_ME').
16 success_msg: "Doorbell MQTT configuration validated"
17 tags: [always, validation]
18
19- name: Validate RTSP stream configuration
20 ansible.builtin.assert:
21 that:
22 - rtsp_port | default(0) | int > 0
23 - image_width | default(0) | int > 0
24 - image_height | default(0) | int > 0
25 fail_msg: |
26 Invalid RTSP stream configuration.
27 Ensure rtsp_port, image_width, and image_height are set to valid values.
28 success_msg: "Doorbell RTSP configuration validated"
29 tags: [always, validation]
30
31- import_tasks: doorbell.yml
32