This puppet module will manage the conserver application. From the website: Conserver is an application that allows multiple users to watch a serial console at the same time.
This module will manage the conserver application by installing required packages, setting up the configuration file, and enabling the service.
This module will affect the following resources, some of which are optional.
- conserver master configuration file
- console configuration file
- conserver init defaults file (optional)
- conserver and console package installation (optional)
- conserver service
- puppetlabs/concat
- puppetlabs/stdlib
- puppet > 3.5.0
include ::conserver
conserver::config::console { 'foo':
'config' => {
'type' => 'exec',
'rw' => '*',
'exec' => 'ssh foo',
'master' => 'conserver'
}
}
class { conserver:
masters => [ 'localhost', '8.8.8.8', '127.0.0.1' ],
}
# automatic master
conserver::config::console { 'foo':
'config' => {
'type' => 'exec',
'rw' => '*',
'exec' => 'ssh foo',
}
}
class { conserver:
use_hiera => true
}
conserver::config::console:
bar:
config:
type: device
device: /dev/ttyUSB0
List of parameters in the form: <param_name> (Type/Default_value). If Default_value is auto: automatic based on osfamily. If Default_value is absent: no default value, and parameter is mandatory.
server_package_name
(String/auto) overrides conserver package name to installclient_package_name
(String/auto) overrides console package name to installservice_name
(String/auto) overrides service name to manageconfdir
(String/auto) overrides configuration directory pathmasters
(Array/[]
) list of conserver masters in your site. This will feed the defined consoles where the master name is omittedreload_cmd
(String/auto) overrides service reload command. Reloads are done when the conserver config file changedrestart_cmd
(String/auto) overrides service restart command. Restarts are done when the init config file changes.enable_client
(Bool/true
) controls wether conserver is enabledenable_server
(Bool/true
) controls wether console is enabledmanage_package
(Bool/true
) controls wether packages shall be managedmanage_init_defaults
(Bool/true
) controls wether sysvinit default files shall be managedserver_init_config_file
(String/auto) overrides sysvinit configfile pathserver_init_config_hash
(Hash/{}) will be merged to OS default. Add any key/values here that may be used by the startup scriptcheck_config_syntax
(Bool/true
) controls wether conserver syntax shall be checked before deploymentuse_hiera
(Bool/true
) controls wether the module should harvest hiera for config items
Conserver config
block.
config
(Hash) Seeconserver.cf
manpageorder
(String/'25'
) Position in config file
conserver::config::config {'*':
config => {
'primaryport' => 33000,
'unifiedlog' => '/var/log/conserver/console.log',
'logfile' => '/var/log/conserver/server.log',
}
}
Conserver access
block.
See conserver.cf
manpage.
trust
(Array) List of trusted masterslimited
(Array) List of masters with limited accessrejected
(Array) List of masters with no accessorder
(String/'15'
) Position in config file
conserver::config::access { '*':
trust => [ 'conserv01', 'conserv02' ]
}
Conserver break
block.
See conserver.cf
manpage.
string
(String)delay
(Int)order
(String/'02'
) Position in config file
conserver::config::break { '1':
string => '\d\035send brk\n'
}
Conserver block to define a console
.
config
(Hash)order
(String/'45'
) Position in config file
conserver::config::console { 'node73':
config => {
master => 'conserv01',
include => 'cyclades_sp16',
device => '/dev/ttyC0'
}
}
Conserver default
block.
See conserver.cf
manpage.
config
(Hash)order
(String/'25'
) Position in config file
conserver::config::default { 'cyclades_sp16':
config => {
type => 'device',
parity => 'none',
baud => 9600,
break => 3,
}
}
Conserver group
block. Defines user groups.
See conserver.cf
manpage.
users
(Array) list of users belonging to grouporder
(String/'05'
) Position in config file
conserver::config:: { 'devops':
users => [ 'john', 'sarah' ]
}
Custom conserver blocks, for which there is no specific conserver::config::*
define.
As parameter you can either use raw content
(e.g. for comments), or template
and config
.
For convenience, the module ships server/custom.erb
which will generate key-values.
content
(String/$title
) Raw block content.template
(String/undef
) Path to template which will be used to build blockconfig
(Hash) Hash content. Used in templateorder
(String/'01'
) Position in config file
conserver::config::custom { '# this is a comment in conserver.cf': }
conserver::config::custom { 'unsupportedblock foo':
template => 'conserver/server/custom.erb',
config => {
'foo' => 'bar'
}
}
Client configuration block (for configuring console
e.g. /etc/console.cf
).
config
(Hash)order
(String/'01'
) Position in config file
conserver::config::client {'*':
config => {
'master' => 'conserv02',
'port' => 33000,
}
}
Only tested on RHEL6 and RHEL7
Issues and patches on github