diff --git a/host-wittgenstein.yml b/host-wittgenstein.yml index a51540f..f4b2190 100644 --- a/host-wittgenstein.yml +++ b/host-wittgenstein.yml @@ -150,5 +150,23 @@ tags: - spaceapi + - name: Setup the Ampel Controller Docker container + docker_container: + name: ampelcontroller + image: "{{ ampelcontroller_image }}" + pull: true + state: started + detach: yes + restart_policy: unless-stopped + env: + TZ: "{{ timezone }}" + MQTT_BROKER: "platon.n39.eu" + MQTT_LEVER_STATE_TOPIC: "{{ topic_lever_state }}" + MQTT_DOOR_EVENTS_TOPIC: "{{ topic_door_events }}" + MQTT_SPACESTATUS_ISOPEN_TOPIC: "{{ spaceapi_topic_status }}" + MQTT_SPACESTATUS_LASTCHANGE_TOPIC: "{{ spaceapi_topic_lastchange }}" + MQTT_TRAFFIC_LIGHT_TOPIC: "{{ topic_traffic_light }}" + tags: + - spaceapi handlers: diff --git a/host_vars/wittgenstein.n39.eu/vars.yml b/host_vars/wittgenstein.n39.eu/vars.yml index e1be7b9..914da6d 100644 --- a/host_vars/wittgenstein.n39.eu/vars.yml +++ b/host_vars/wittgenstein.n39.eu/vars.yml @@ -10,3 +10,7 @@ spaceapi_image: netz39/spaceapi-service:0.1.0 spaceapi_topic_status: "Netz39/SpaceAPI/isOpen" spaceapi_topic_lastchange: "Netz39/SpaceAPI/lastchange" +ampelcontroller_image: netz39/ampel-controller:0.1.0 +topic_lever_state: "Netz39/Things/StatusSwitch/Lever/State" +topic_door_events: "Netz39/Things/Door/Events" +topic_traffic_light: "Netz39/Things/Ampel/Light"