xoxys.mosquitto/tasks/install.yml

44 lines
1.3 KiB
YAML
Raw Normal View History

2017-12-16 21:33:26 +01:00
---
2018-11-04 23:21:13 +01:00
- block:
- name: Add mttq repository
yum_repository:
name: mttq
file: Mosquitto
description: MTTQ Broker
baseurl: "https://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-{{ ansible_distribution_major_version }}/"
gpgkey: "https://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-{{ ansible_distribution_major_version }}/repodata/repomd.xml.key"
gpgcheck: yes
enabled: yes
2017-12-16 21:33:26 +01:00
2018-11-04 23:21:13 +01:00
- name: Install mttq packages
yum:
name: "{{ item }}"
state: present
with_items:
- mosquitto
- mosquitto-clients
2018-11-04 23:21:13 +01:00
# - name: Create group '{{ mosquitto_group }}'
# group:
# name: '{{ mosquitto_group }}'
# state: present
2018-11-04 23:21:13 +01:00
# - name: Create user '{{ mosquitto_user }}'
# user:
# name: '{{ mosquitto_user }}'
# group: '{{ mosquitto_group }}'
# system: yes
# createhome: no
# shell: /sbin/nologin
2017-12-16 22:14:07 +01:00
2018-11-04 23:21:13 +01: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