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_user: mosquitto
mosquitto_group: mosquitto mosquitto_group: mosquitto
mosquitto_port: 1883 mosquitto_port: 1883

View File

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

View File

@ -1,39 +1,43 @@
--- ---
- name: Add mttq repository - block:
- name: Add mttq repository
yum_repository: yum_repository:
name: mttq name: mttq
file: mttq file: Mosquitto
description: MTTQ Broker description: MTTQ Broker
baseurl: "http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-{{ ansible_distribution_major_version }}/" baseurl: "https://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" 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: yum:
name: "{{ item }}" name: "{{ item }}"
state: installed state: present
with_items: with_items:
- mosquitto - mosquitto
- mosquitto-clients - mosquitto-clients
- name: Create group '{{ mosquitto_group }}' # - name: Create group '{{ mosquitto_group }}'
group: # group:
name: '{{ mosquitto_group }}' # name: '{{ mosquitto_group }}'
state: present # state: present
- name: Create user '{{ mosquitto_user }}' # - name: Create user '{{ mosquitto_user }}'
user: # user:
name: '{{ mosquitto_user }}' # name: '{{ mosquitto_user }}'
group: '{{ mosquitto_group }}' # group: '{{ mosquitto_group }}'
system: yes # system: yes
createhome: no # createhome: no
shell: /sbin/nologin # shell: /sbin/nologin
- name: Copy default configuration # - name: Copy default configuration
template: # template:
src: "etc/mosquitto/conf.d/default.conf.j2" # src: "etc/mosquitto/conf.d/default.conf.j2"
dest: "{{ mosquitto_config_dir }}/default.conf" # dest: "{{ mosquitto_config_dir }}/default.conf"
owner: root # owner: root
group: root # group: root
mode: 0644 # mode: 0644
notify: # notify: __mosquitto_restart
- mosquitto_restart become: True
become_user: root

View File

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