25 lines
474 B
YAML
25 lines
474 B
YAML
|
---
|
||
|
- name: Install packages
|
||
|
ansible.builtin.apt:
|
||
|
name:
|
||
|
- mosquitto
|
||
|
state: latest
|
||
|
|
||
|
- name: Configure mosquitto
|
||
|
ansible.builtin.copy:
|
||
|
src: files/mosquitto/conf.d
|
||
|
dest: /etc/mosquitto
|
||
|
|
||
|
- name: Copy mosquitto password
|
||
|
ansible.builtin.template:
|
||
|
src: mosquitto/passwd.j2
|
||
|
dest: /etc/mosquitto/passwd
|
||
|
mode: '0600'
|
||
|
owner: root
|
||
|
group: root
|
||
|
|
||
|
- name: Restart mosquitto
|
||
|
ansible.builtin.service:
|
||
|
name: mosquitto
|
||
|
state: restarted
|