xoxys.mosquitto/tasks/install.yml
Robert Kaussow 4f954e0519
All checks were successful
continuous-integration/drone/push Build is passing
remove iptables integration
2019-10-28 20:07:54 +01:00

32 lines
819 B
YAML

---
- block:
- name: Install mqtt packages
package:
name: "{{ item }}"
state: present
loop: "{{ mosquitto_packages_extra + __mosquitto_packages }}"
- name: Create group '{{ mosquitto_group }}'
group:
name: '{{ mosquitto_group }}'
state: present
- name: Create user '{{ mosquitto_user }}'
user:
name: '{{ mosquitto_user }}'
group: '{{ mosquitto_group }}'
home: "{{ mosquitto_base_dir }}"
system: yes
shell: /sbin/nologin
- name: Deploy default configuration
template:
src: "etc/mosquitto/mosquitto.conf.j2"
dest: "{{ mosquitto_base_dir }}/mosquitto.conf"
owner: root
group: root
mode: 0644
notify: __mosquitto_restart
become: True
become_user: root