samdoran.mosquitto
Mosquitto
Installieren Sie Eclipse Mosquitto, einen leichten MQTT Broker.
Anforderungen
EPEL-Repository. Docker, falls in einem Container ausgeführt wird.
Rollenvariablen
Name | Standardwert | Beschreibung |
---|---|---|
mqtt_installation_method |
native |
Art der Installation des Dienstes, entweder native oder container . |
mqtt_directories |
[siehe defaults/main.yml] |
Pfade für Konfiguration, Daten und Protokolle |
mqtt_config_files |
[siehe defaults/main.yml] |
|
mqtt_touch_files |
[siehe defaults/main.yml] |
|
mqtt_include_dir |
{{ mqtt_config_dir }}/conf.d |
|
mqtt_accounts |
[] |
Liste der Konten und deren Hashes, die mit mosquitto_passwd erstellt wurden und Zugriff auf den Broker haben. |
mqtt_container_name |
mqtt |
Name des laufenden Containers. |
mqtt_image_name |
eclipse-mosquitto |
Name des zu pullenden Images. |
mqtt_container_network_mode |
bridge |
Netzwerkmodus des Containers. |
mqtt_container_restart_policy |
always |
Neustartpolitik des Containers. Setzen auf always stellt sicher, dass der Container beim Start des Docker-Daemons startet. |
mqtt_container_data_path |
/mosquitto |
Pfad im laufenden Container, wo die Konfiguration verfügbar ist. |
mqtt_container_state |
started |
Zustand des Containers. |
mqtt_container_published_ports |
[siehe defaults/main.yml] |
Ports, die vom Container veröffentlicht werden. |
mqtt_container_volumes |
[siehe defaults/main.yml] |
Volumes, die in den laufenden Container gemountet werden. |
mqtt_sys_interval |
10 |
|
mqtt_store_clean_interval |
10 |
|
mqtt_pid_file |
/var/run/mosquitto.pid |
|
mqtt_user |
mosquitto |
|
mqtt_max_inflight_messages |
20 |
|
mqtt_max_inflight_bytes |
0 |
|
mqtt_max_queued_messages |
100 |
|
mqtt_max_queued_bytes |
0 |
|
mqtt_queue_qos0_messages |
false |
|
mqtt_message_size_limit |
0 |
|
mqtt_allow_zero_length_clientid |
true |
|
mqtt_auto_id_prefix |
`` | |
mqtt_persistent_client_expiration |
1d |
|
mqtt_allow_duplicate_messages |
false |
|
mqtt_upgrade_outgoing_qos |
false |
|
mqtt_set_tcp_nodelay |
false |
|
mqtt_per_listener_settings |
false |
|
mqtt_bind_address |
{{ ansible_facts.default_ipv4_address }} |
|
mqtt_port |
1883 |
|
mqtt_max_connections |
-1 |
|
mqtt_protocol |
mqtt |
|
mqtt_http_dir |
{{ mqtt_data_dir }} |
|
mqtt_use_username_as_clientid |
false |
|
mqtt_cafile |
'' |
|
mqtt_capath |
'' |
|
mqtt_certfile |
'' |
|
mqtt_keyfile |
'' |
|
mqtt_tls_version |
1.2 |
|
mqtt_require_certificate |
false |
|
mqtt_use_identity_as_username |
false |
|
mqtt_use_subject_as_username |
false |
|
mqtt_crlfile |
'' |
|
mqtt_ciphers |
DEFAULT:!aNULL:!eNULL:!LOW:!EXPORT:!SSLv2:@STRENGTH |
|
mqtt_psk_hint |
Greetings from mosquitto |
|
mqtt_listeners |
[] |
|
mqtt_mount_point |
'' |
|
mqtt_autosave_interval |
1800 |
|
mqtt_autosave_on_changes |
false |
|
mqtt_persistence |
false |
|
mqtt_persistence_file |
mosquitto.db |
|
mqtt_persistence_location |
{{ mqtt_data_dir }}/ |
|
mqtt_log_dests |
[file /var/log/mosquitto.log] |
|
mqtt_log_facility |
daemon |
|
mqtt_log_types |
[error, warning] |
|
mqtt_websockets_log_level |
0 |
|
mqtt_connection_messages |
true |
|
mqtt_log_timestamp |
true |
|
mqtt_clientid_prefixes |
false |
|
mqtt_allow_anonymous |
true |
|
mqtt_password_file |
{{ mqtt_config_dir }}/passwd |
|
mqtt_psk_file |
'' |
|
mqtt_acl_file |
{{ mqtt_config_dir }}/acl |
|
mqtt_auth_plugins |
[] |
|
mqtt_connection |
<name> |
|
mqtt_address |
<host>[:<port>] [<host>[:<port>]] |
|
mqtt_topic |
` |
in |
mqtt_bridge_protocol_version |
mqttv311 |
|
mqtt_bridge_attempt_unsubscribe |
true |
|
mqtt_round_robin |
false |
|
mqtt_remote_clientid |
`` | |
mqtt_local_clientid |
false |
|
mqtt_cleansession |
false |
|
mqtt_notifications |
true |
|
mqtt_notification_topic |
$SYS/broker/connection/<clientid>/state |
|
mqtt_keepalive_interval |
60 |
|
mqtt_start_type |
automatic |
|
mqtt_restart_timeout |
30 |
|
mqtt_idle_timeout |
60 |
|
mqtt_threshold |
10 |
|
mqtt_try_private |
true |
|
mqtt_remote_username |
`` | |
mqtt_remote_password |
`` | |
mqtt_bridge_cafile |
`` | |
mqtt_bridge_capath |
`` | |
mqtt_bridge_certfile |
`` | |
mqtt_bridge_keyfile |
`` | |
mqtt_bridge_insecure |
false |
|
mqtt_bridge_identity |
`` | |
mqtt_bridge_psk |
`` |
Abhängigkeiten
- samdoran.repo_epel
- samdoran.docker (nur wenn in einem Container ausgeführt)
Beispiel-Playbook
- hosts: all
tasks:
- import_role:
name: samdoran.repo_epel
- import_role:
name: samdoran.mosquitto
Lizenz
Apache 2.0