system-config/modules/salt/manifests/init.pp
Jeremy Stanley 1f6f6574d5 Revert "Disable salt master and minions globally"
This reverts commit ec900482c3.

The original reason for disabling salt globally was a slow
memory/process leak with the message queue in versions prior to
0.16. Ensuring salt packages are upgraded everywhere should mitigate
the issue.

Change-Id: Ie5cb4df7367d82551b79decf2ba71349df1966d7
2013-09-12 17:20:15 +00:00

50 lines
1010 B
Puppet

# Class salt
#
class salt (
$salt_master = $::fqdn
) {
if ($::osfamily == 'Debian') {
include apt
# Wrap in ! defined checks to allow minion and master installs on the
# same host.
if ! defined(Apt::Ppa['ppa:saltstack/salt']) {
apt::ppa { 'ppa:saltstack/salt': }
}
if ! defined(Package['python-software-properties']) {
package { 'python-software-properties':
ensure => present,
}
}
Apt::Ppa['ppa:saltstack/salt'] -> Package['salt-minion']
}
package { 'salt-minion':
ensure => present
}
file { '/etc/salt/minion':
ensure => present,
owner => 'root',
group => 'root',
mode => '0644',
content => template('salt/minion.erb'),
replace => true,
require => Package['salt-minion'],
}
service { 'salt-minion':
ensure => running,
enable => true,
require => File['/etc/salt/minion'],
subscribe => [
Package['salt-minion'],
File['/etc/salt/minion'],
],
}
}