install only for debug

This commit is contained in:
Robert Kaussow 2018-11-04 23:21:13 +01:00
parent bfe4112270
commit 357496768d
4 changed files with 42 additions and 38 deletions

View File

@ -1,3 +1,4 @@
---
mosquitto_user: mosquitto
mosquitto_group: mosquitto
mosquitto_port: 1883

View File

@ -5,5 +5,4 @@
daemon_reload: yes
name: mosquitto
enabled: yes
listen:
- "mosquitto_restart"
listen: __mosquitto_restart

View File

@ -1,39 +1,43 @@
---
- name: Add mttq repository
- block:
- name: Add mttq repository
yum_repository:
name: mttq
file: mttq
file: Mosquitto
description: MTTQ Broker
baseurl: "http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-{{ ansible_distribution_major_version }}/"
gpgkey: "http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-{{ ansible_distribution_major_version }}/repodata/repomd.xml.key"
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
- name: Install mttq packages
- name: Install mttq packages
yum:
name: "{{ item }}"
state: installed
state: present
with_items:
- mosquitto
- mosquitto-clients
- name: Create group '{{ mosquitto_group }}'
group:
name: '{{ mosquitto_group }}'
state: present
# - name: Create group '{{ mosquitto_group }}'
# group:
# name: '{{ mosquitto_group }}'
# state: present
- name: Create user '{{ mosquitto_user }}'
user:
name: '{{ mosquitto_user }}'
group: '{{ mosquitto_group }}'
system: yes
createhome: no
shell: /sbin/nologin
# - name: Create user '{{ mosquitto_user }}'
# user:
# name: '{{ mosquitto_user }}'
# group: '{{ mosquitto_group }}'
# system: yes
# createhome: no
# shell: /sbin/nologin
- 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
# - 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

View File

@ -1,3 +1,3 @@
---
- include_tasks: install.yml
- include_tasks: config.yml
- import_tasks: install.yml
# - import_tasks: config.yml