Add websocket listner to mosquitto

This commit adds configuring a websocket listener to the mosquitto
config. By default it will listen on port 80. The next step will be
enabling an ssl/tls encrypted websocket port too.

Change-Id: Ibec91fd0abc637ea7087872cab1ec8487c73acae
This commit is contained in:
Matthew Treinish 2016-07-27 11:27:42 -04:00
parent e6e978cae7
commit b0ab19c7c6
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
2 changed files with 7 additions and 1 deletions

View File

@ -20,6 +20,7 @@ class mosquitto::server (
$persistence_location = '/var/lib/mosquitto/',
$infra_service_username = 'infra',
$infra_service_password,
$websocket_port = 80,
) {
file {'/etc/mosquitto/infra_service.pw':

View File

@ -274,7 +274,12 @@ pid_file <%= @pid_file %>
# Note that for a websockets listener it is not possible to bind to a host
# name.
# listener port-number [ip address/host name]
#listener
#
listener 1883
listener <%= @websocket_port %>
protocol websockets
# The maximum number of client connections to allow. This is
# a per listener setting.