xoxys.mosquitto/README.md

265 lines
4.3 KiB
Markdown
Raw Normal View History

2019-10-18 08:09:41 +00:00
# xoxys.mosquitto
[![Build Status](https://drone.rknet.org/api/badges/ansible/xoxys.mosquitto/status.svg)](https://drone.rknet.org/ansible/xoxys.mosquitto)
2017-12-16 18:17:49 +00:00
2019-10-18 08:09:41 +00:00
Role to setup mosquitto mqtt broker
## Table of content
* [Default Variables](#default-variables)
2019-11-22 23:05:12 +00:00
* [mosquitto_acl](#mosquitto_acl)
* [mosquitto_acl_enabled](#mosquitto_acl_enabled)
* [mosquitto_acl_file](#mosquitto_acl_file)
2019-10-18 08:09:41 +00:00
* [mosquitto_base_dir](#mosquitto_base_dir)
* [mosquitto_bind_address](#mosquitto_bind_address)
2019-11-22 23:05:12 +00:00
* [mosquitto_ca_path](#mosquitto_ca_path)
* [mosquitto_group](#mosquitto_group)
2019-10-18 08:09:41 +00:00
* [mosquitto_packages_extra](#mosquitto_packages_extra)
* [mosquitto_password_auth_enabled](#mosquitto_password_auth_enabled)
* [mosquitto_password_auth_file](#mosquitto_password_auth_file)
* [mosquitto_password_auth_users](#mosquitto_password_auth_users)
2019-11-22 23:05:12 +00:00
* [mosquitto_persistence_enabled](#mosquitto_persistence_enabled)
* [mosquitto_persistence_path](#mosquitto_persistence_path)
* [mosquitto_pid_file](#mosquitto_pid_file)
* [mosquitto_port](#mosquitto_port)
2019-10-18 08:09:41 +00:00
* [mosquitto_tls_cert_path](#mosquitto_tls_cert_path)
2019-11-22 23:05:12 +00:00
* [mosquitto_tls_cert_source](#mosquitto_tls_cert_source)
* [mosquitto_tls_ciphers](#mosquitto_tls_ciphers)
* [mosquitto_tls_enabled](#mosquitto_tls_enabled)
2019-10-18 08:09:41 +00:00
* [mosquitto_tls_key_path](#mosquitto_tls_key_path)
2019-11-22 23:05:12 +00:00
* [mosquitto_tls_key_source](#mosquitto_tls_key_source)
* [mosquitto_user](#mosquitto_user)
2019-10-18 08:09:41 +00:00
* [Dependencies](#dependencies)
* [License](#license)
* [Author](#author)
---
## Default Variables
2019-11-22 23:05:12 +00:00
### mosquitto_acl
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_acl: []
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
#### Example usage
2019-10-18 08:09:41 +00:00
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_acl:
- name: iot
user: admin
acls:
- acl_base: topic (topic|pattern, defaults to topic)
acl_topic: ""
acl_policy: readwrite
- name: readonly_iot
user: user1
acls:
- acl_base: topic
acl_topic: my/devices
acl_policy: readwrite
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_acl_enabled
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_acl_enabled: false
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_acl_file
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_acl_file: '{{ mosquitto_base_dir }}/aclfile'
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_base_dir
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_base_dir: /etc/mosquitto
2019-10-18 08:09:41 +00:00
```
### mosquitto_bind_address
#### Default value
```YAML
mosquitto_bind_address: '{{ ansible_default_ipv4.address }}'
```
2019-11-22 23:05:12 +00:00
### mosquitto_ca_path
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_ca_path: /etc/pki/tls/certs/
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_group
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_group: mosquitto
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_packages_extra
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_packages_extra: []
2019-10-18 08:09:41 +00:00
```
### mosquitto_password_auth_enabled
#### Default value
```YAML
mosquitto_password_auth_enabled: false
```
### mosquitto_password_auth_file
#### Default value
```YAML
mosquitto_password_auth_file: '{{ mosquitto_base_dir }}/passwd'
```
### mosquitto_password_auth_users
#### Default value
```YAML
mosquitto_password_auth_users: []
```
#### Example usage
```YAML
mosquitto_password_auth_users:
- name: admin
password: mysecret
state: present
- name: user1
password: very_secure
state: absent
```
2019-11-22 23:05:12 +00:00
### mosquitto_persistence_enabled
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_persistence_enabled: false
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_persistence_path
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_persistence_path: /var/lib/mosquitto/mosquitto.db
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_pid_file
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_pid_file: /var/run/mosquitto.pid
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_port
#### Default value
2019-10-18 08:09:41 +00:00
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_port: 1883
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_tls_cert_path
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_tls_cert_path: '{{ mosquitto_base_dir }}/tls/certs/mycert.pem'
```
### mosquitto_tls_cert_source
#### Default value
```YAML
mosquitto_tls_cert_source: mycert.pem
2019-10-18 08:09:41 +00:00
```
### mosquitto_tls_ciphers
#### Default value
```YAML
mosquitto_tls_ciphers:
- DEFAULT
- '!aNULL'
- '!eNULL'
- '!LOW'
- '!EXPORT'
- '!SSLv2'
- '@STRENGTH'
```
2019-11-22 23:05:12 +00:00
### mosquitto_tls_enabled
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_tls_enabled: false
2019-10-18 08:09:41 +00:00
```
2019-11-22 23:05:12 +00:00
### mosquitto_tls_key_path
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_tls_key_path: '{{ mosquitto_base_dir }}/tls/private/mykey.pem'
2019-10-18 08:09:41 +00:00
```
### mosquitto_tls_key_source
#### Default value
```YAML
mosquitto_tls_key_source: mykey.pem
```
2019-11-22 23:05:12 +00:00
### mosquitto_user
2019-10-18 08:09:41 +00:00
#### Default value
```YAML
2019-11-22 23:05:12 +00:00
mosquitto_user: mosquitto
2019-10-18 08:09:41 +00:00
```
## Dependencies
None.
## License
MIT
## Author
2019-11-07 08:29:49 +00:00
[xoxys](https://gitea.rknet.org/xoxys)