install only for debug
This commit is contained in:
parent
bfe4112270
commit
357496768d
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
mosquitto_user: mosquitto
|
mosquitto_user: mosquitto
|
||||||
mosquitto_group: mosquitto
|
mosquitto_group: mosquitto
|
||||||
mosquitto_port: 1883
|
mosquitto_port: 1883
|
||||||
|
@ -5,5 +5,4 @@
|
|||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
name: mosquitto
|
name: mosquitto
|
||||||
enabled: yes
|
enabled: yes
|
||||||
listen:
|
listen: __mosquitto_restart
|
||||||
- "mosquitto_restart"
|
|
||||||
|
@ -1,39 +1,43 @@
|
|||||||
---
|
---
|
||||||
- name: Add mttq repository
|
- block:
|
||||||
yum_repository:
|
- name: Add mttq repository
|
||||||
name: mttq
|
yum_repository:
|
||||||
file: mttq
|
name: mttq
|
||||||
description: MTTQ Broker
|
file: Mosquitto
|
||||||
baseurl: "http://download.opensuse.org/repositories/home:/oojah:/mqtt/CentOS_CentOS-{{ ansible_distribution_major_version }}/"
|
description: MTTQ Broker
|
||||||
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:
|
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
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
---
|
---
|
||||||
- include_tasks: install.yml
|
- import_tasks: install.yml
|
||||||
- include_tasks: config.yml
|
# - import_tasks: config.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user