27 lines
608 B
YAML
27 lines
608 B
YAML
---
|
|
- name: mqtt-internal
|
|
tags: mqtt_internal
|
|
block:
|
|
- name: Install dependencies
|
|
ansible.builtin.apt:
|
|
name:
|
|
- mosquitto
|
|
- avahi-daemon
|
|
|
|
- name: Configure Mosquitto
|
|
ansible.builtin.template:
|
|
src: "{{ item }}"
|
|
dest: "/etc/mosquitto/conf.d/{{ item }}"
|
|
owner: root
|
|
group: root
|
|
mode: 0644
|
|
notify: restart mosquitto
|
|
with_items:
|
|
- internal.conf
|
|
- public-bridge.conf
|
|
|
|
- name: Start mosquitto
|
|
ansible.builtin.systemd:
|
|
name: mosquitto
|
|
state: started
|
|
enabled: yes
|