system-config/modules/salt/manifests/init.pp
Monty Taylor ec900482c3 Disable salt master and minions globally
Change-Id: I9ec8a411c8862f1033dbeae21a78d05b0b4fa986
2013-08-20 22:12:40 -04:00

50 lines
1011 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 => stopped,
enable => false,
require => File['/etc/salt/minion'],
subscribe => [
Package['salt-minion'],
File['/etc/salt/minion'],
],
}
}