ansible-pilote/tasks/mosquitto.yml

26 lines
542 B
YAML
Raw Normal View History

---
- name: Install packages
ansible.builtin.package:
name: mosquitto
- name: Deploy general configuration
ansible.builtin.template:
src: mosquitto/default.conf.j2
dest: /etc/mosquitto/conf.d/default.conf
mode: "0644"
owner: root
group: root
- name: Copy mosquitto password
ansible.builtin.template:
src: mosquitto/passwd.j2
dest: /etc/mosquitto/passwd
mode: '0640'
owner: root
group: mosquitto
- name: Restart mosquitto
ansible.builtin.service:
name: mosquitto
state: restarted