Skip to main content

Mosquitto Role

Deploy the Eclipse Mosquitto MQTT broker as a Podman quadlet.


Variables​

VariableTypeOptionsDefaultDescription
podman_userstring---{{ ansible_user }}system user for rootless podman operations
mosquitto_proxy_enabledbooltrue, falsefalseenable HTTP proxy for image pulls
mosquitto_proxy_httpstring---""HTTP proxy URL
mosquitto_proxy_httpsstring---""HTTPS proxy URL
mosquitto_proxy_no_proxystring---""comma-separated list of proxy exclusions
mosquitto_proxy_envlist of string---[]generated proxy environment entries
mosquitto_network_enabledbooltrue, falsetruecreate and manage the podman network
mosquitto_network_driverstring---bridgepodman network driver
mosquitto_network_namestring---mosquitto-internalpodman network name
mosquitto_bind_ipstring---127.0.0.1host IP to bind exposed ports to
mosquitto_port_map_enabledbooltrue, falsetrueexpose container ports on the host
mosquitto_port_maplist of string---["1883:1883","9001:9001"]host:container port mappings
mosquitto_versionstring---2.1-alpineMosquitto version identifier used in the custom image tag
mosquitto_go_auth_versionstring---3.5.0mosquitto-go-auth release used to build the image
mosquitto_imagestring---{{ mosquitto_image_name }}:{{ mosquitto_image_tag }}custom image name and tag
mosquitto_image_namestring---localhost/mosquitto-customcustom image name
mosquitto_image_tagstring---{{ mosquitto_version }}-{{ mosquitto_go_auth_version }}custom image tag
mosquitto_autoupdatebooltrue, falsetrueenable podman auto-update for this container
mosquitto_environment_varsdict---{}extra environment variables injected into the container
mosquitto_pwfile_usersdict---{}map of username to password_hash for the password file
mosquitto_usersdict---{}map of username to clear-text password; hashes are generated during deployment
mosquitto_acl_usersdict---{}map of usernames to ACL rule objects or raw topic rules
mosquitto_acl_patternslist of dict---[{"access":"readwrite","topic":"%u/#"}]ACL pattern rules using %u and %c substitutions
mosquitto_acl_ruleslist of string---[]raw Mosquitto ACL lines for advanced rules
mosquitto_go_auth_optionsdict---{"backends":"files","files_password_path":"/mosquitto/config/passwd","files_acl_path":"/mosquitto/config/acl"}map passed through as auth_opt_* go-auth settings
mosquitto_extra_fileslist of dict---[]arbitrary file entries with src (controller path) or source (target path), dest, optional mount, mode, and template
mosquitto_extra_dirslist of dict---[]arbitrary directory entries with src (controller directory) or source (target path), dest, optional mount and mode
mosquitto_entrypointstring---""optional container entrypoint override