be35055538
Some users may be running various nodes (including master node since 7.0) as virtual machines – acpid allows them to do graceful shutdown or reboot without using ssh. The commit introduces custom fact to check if ACPI is available via procfs on machine. acpid itself is only installed and started if node is not physical and has ACPI. Closes-Bug: 1470172 Change-Id: I4186b4a2fbb57a0c63123377f986f888c27aa13e Co-authored-by: Bartłomiej Piotrowski <bpiotrowski@mirantis.com>
28 lines
470 B
Puppet
28 lines
470 B
Puppet
# == Class: osnailyfacter::acpid
|
|
#
|
|
# Allow to install and configure acpid.
|
|
#
|
|
# === Parameters
|
|
#
|
|
# [*service_enabled*]
|
|
# Enable acpid service, default to true.
|
|
#
|
|
# [*service_state*]
|
|
# Start acpid service, default to running.
|
|
#
|
|
class osnailyfacter::acpid (
|
|
$service_enabled = true,
|
|
$service_state = 'running',
|
|
){
|
|
|
|
package { 'acpid':
|
|
ensure => 'installed',
|
|
} ->
|
|
|
|
service { 'acpid':
|
|
ensure => $service_state,
|
|
enable => $service_enabled,
|
|
}
|
|
}
|
|
|