mqtt: Ensure create auth files before writing using mosquitto_passwd

Fixes error on calling tool if file does not exist
dehydrated
Felix Stupp 5 years ago
parent 4b6cef5c10
commit cf632d1a56
Signed by: zocker
GPG Key ID: 93E1BD26F6B02FB7

@ -40,6 +40,14 @@
mode: "u=rw,g=r,o=r"
notify: reconfigure mosquitto acl
- name: Create auth main file
file:
state: touch
path: "{{ environment_directory | quote }}/0_main.auth"
owner: root
group: root
mode: "u=rw,g=r,o=r"
- name: Store auth main file
command: >-
mosquitto_passwd

@ -9,6 +9,14 @@
mode: "u=rw,g=r,o=r"
notify: reconfigure mosquitto acl
- name: Create auth file for user
file:
state: touch
path: "{{ environment_directory | quote }}/{{ user | quote }}.auth"
owner: root
group: root
mode: "u=rw,g=r,o=r"
- name: Store auth file for user
command: >-
mosquitto_passwd

Loading…
Cancel
Save