--- - name: Store acl file for user template: src: user.acl dest: "{{ environment_directory }}/{{ user }}.acl" owner: root group: root mode: "u=rw,g=r,o=r" notify: reconfigure mosquitto acl - name: Store auth file for user command: >- mosquitto_passwd -b {{ environment_directory | quote }}/{{ user | quote }}.auth {{ user | quote }} {{ pass | quote }} notifiy: reconfigure mosquitto auth