2017-12-16 20:33:26 +00:00
|
|
|
---
|
2018-11-04 22:21:13 +00:00
|
|
|
- block:
|
|
|
|
- name: Install mttq packages
|
2018-11-04 22:34:41 +00:00
|
|
|
package:
|
2018-11-04 22:21:13 +00:00
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
with_items:
|
|
|
|
- mosquitto
|
|
|
|
- mosquitto-clients
|
2017-12-16 21:00:52 +00:00
|
|
|
|
2018-11-04 22:21:13 +00:00
|
|
|
# - name: Create group '{{ mosquitto_group }}'
|
|
|
|
# group:
|
|
|
|
# name: '{{ mosquitto_group }}'
|
|
|
|
# state: present
|
2017-12-16 21:00:52 +00:00
|
|
|
|
2018-11-04 22:21:13 +00:00
|
|
|
# - name: Create user '{{ mosquitto_user }}'
|
|
|
|
# user:
|
|
|
|
# name: '{{ mosquitto_user }}'
|
|
|
|
# group: '{{ mosquitto_group }}'
|
|
|
|
# system: yes
|
|
|
|
# createhome: no
|
|
|
|
# shell: /sbin/nologin
|
2017-12-16 21:14:07 +00:00
|
|
|
|
2018-11-04 22:21:13 +00:00
|
|
|
# - name: Copy default configuration
|
|
|
|
# template:
|
|
|
|
# src: "etc/mosquitto/conf.d/default.conf.j2"
|
|
|
|
# dest: "{{ mosquitto_config_dir }}/default.conf"
|
|
|
|
# owner: root
|
|
|
|
# group: root
|
|
|
|
# mode: 0644
|
|
|
|
# notify: __mosquitto_restart
|
|
|
|
become: True
|
|
|
|
become_user: root
|