Make things work
This patch gets to a point where mosquitto is installed and configured with sane defaults. The next step is to add configurability to the point necessary for the infra use case.
This commit is contained in:
parent
c5f32fc7a4
commit
5b97169e50
@ -15,12 +15,17 @@
|
|||||||
# == Class: mosquitto
|
# == Class: mosquitto
|
||||||
#
|
#
|
||||||
class mosquitto::server (
|
class mosquitto::server (
|
||||||
|
$pid_file = '/var/run/mosquitto.pid',
|
||||||
|
$log_file = '/var/log/mosquitto/mosquitto.log',
|
||||||
|
$persistence_location = '/var/lib/mosquitto/',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
file {'/etc/mosquitto/mosquitto.conf':
|
file {'/etc/mosquitto/mosquitto.conf':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
mode => '0644',
|
||||||
content => template('mosquitto/mosquitto.conf.erb'),
|
content => template('mosquitto/mosquitto.conf.erb'),
|
||||||
}
|
require => Package['mosquitto'],
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
# This should be set to /var/run/mosquitto.pid if mosquitto is
|
# This should be set to /var/run/mosquitto.pid if mosquitto is
|
||||||
# being run automatically on boot with an init script and
|
# being run automatically on boot with an init script and
|
||||||
# start-stop-daemon or similar.
|
# start-stop-daemon or similar.
|
||||||
#pid_file
|
pid_file <%= @pid_file %>
|
||||||
|
|
||||||
# When run as root, drop privileges to this user and its primary
|
# When run as root, drop privileges to this user and its primary
|
||||||
# group.
|
# group.
|
||||||
@ -422,17 +422,18 @@
|
|||||||
# subscriptions, currently in-flight messages and retained
|
# subscriptions, currently in-flight messages and retained
|
||||||
# messages.
|
# messages.
|
||||||
# retained_persistence is a synonym for this option.
|
# retained_persistence is a synonym for this option.
|
||||||
#persistence false
|
persistence true
|
||||||
|
|
||||||
# The filename to use for the persistent database, not including
|
# The filename to use for the persistent database, not including
|
||||||
# the path.
|
# the path.
|
||||||
#persistence_file mosquitto.db
|
#persistence_file
|
||||||
|
|
||||||
# Location for persistent database. Must include trailing /
|
# Location for persistent database. Must include trailing /
|
||||||
# Default is an empty string (current directory).
|
# Default is an empty string (current directory).
|
||||||
# Set to e.g. /var/lib/mosquitto/ if running as a proper service on Linux or
|
# Set to e.g. /var/lib/mosquitto/ if running as a proper service on Linux or
|
||||||
# similar.
|
# similar.
|
||||||
#persistence_location
|
persistence_location <%= @persistence_location %>
|
||||||
|
|
||||||
|
|
||||||
# =================================================================
|
# =================================================================
|
||||||
# Logging
|
# Logging
|
||||||
@ -463,6 +464,8 @@
|
|||||||
# Use "log_dest none" if you wish to disable logging.
|
# Use "log_dest none" if you wish to disable logging.
|
||||||
#log_dest stderr
|
#log_dest stderr
|
||||||
|
|
||||||
|
log_dest file <%= @log_file %>
|
||||||
|
|
||||||
# If using syslog logging (not on Windows), messages will be logged to the
|
# If using syslog logging (not on Windows), messages will be logged to the
|
||||||
# "daemon" facility by default. Use the log_facility option to choose which of
|
# "daemon" facility by default. Use the log_facility option to choose which of
|
||||||
# local0 to local7 to log to instead. The option value should be an integer
|
# local0 to local7 to log to instead. The option value should be an integer
|
||||||
@ -809,7 +812,7 @@
|
|||||||
# in the main file. This option will only be processed from the main
|
# in the main file. This option will only be processed from the main
|
||||||
# configuration file. The directory specified must not contain the
|
# configuration file. The directory specified must not contain the
|
||||||
# main configuration file.
|
# main configuration file.
|
||||||
#include_dir
|
include_dir /etc/mosquitto/conf.d
|
||||||
|
|
||||||
# =================================================================
|
# =================================================================
|
||||||
# rsmb options - unlikely to ever be supported
|
# rsmb options - unlikely to ever be supported
|
||||||
|
Loading…
Reference in New Issue
Block a user