You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
627 B
YAML

---
- 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: 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
-b
{{ environment_directory | quote }}/{{ user | quote }}.auth
{{ user | quote }}
{{ pass | quote }}
notify: reconfigure mosquitto auth