1
0
Fork 0
home-stack-ansible/roles/hydroqc2mqtt/tasks/main.yml

19 lines
936 B
YAML

- name: Start hydroqc2mqtt
docker_container:
name: hydroqc2mqtt
image: registry.gitlab.com/hydroqc/hydroqc2mqtt:{{ hydroqc2mqtt.version }}
state: started
restart_policy: unless-stopped
network_mode: host
env:
MQTT_HOST: 'localhost'
MQTT_PORT: '1883'
HQ2M_CONTRACTS_0_NAME: 'home'
HQ2M_CONTRACTS_0_USERNAME: '{{ hydroqc2mqtt.hydroquebec.username }}'
HQ2M_CONTRACTS_0_PASSWORD: '{{ hydroqc2mqtt.hydroquebec.password }}'
HQ2M_CONTRACTS_0_CUSTOMER: '{{ hydroqc2mqtt.hydroquebec.customer }}'
HQ2M_CONTRACTS_0_ACCOUNT: '{{ hydroqc2mqtt.hydroquebec.account }}'
HQ2M_CONTRACTS_0_CONTRACT: '{{ hydroqc2mqtt.hydroquebec.contract }}'
HQ2M_CONTRACTS_0_SYNC_HOURLY_CONSUMPTION_ENABLED: "true"
HQ2M_CONTRACTS_0_HOME_ASSISTANT_WEBSOCKET_URL: 'http://localhost:8123/api/websocket'
HQ2M_CONTRACTS_0_HOME_ASSISTANT_TOKEN: '{{ hydroqc2mqtt.homeassistant.token }}'