Add a puppet module to install saltstack minion and saltstack master. This is to be used to bootstrap saltstack. As a result the only configurable option here is the master node that minions should talk to. Eventually salt master should have a setup similar to puppet to manage its own configs. Change-Id: I27cb902f043c4f4a2a53c599c08ae94df297cc97 Reviewed-on: https://review.openstack.org/14235 Reviewed-by: Monty Taylor <mordred@inaugust.com> Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> Approved: James E. Blair <corvus@inaugust.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
		
			
				
	
	
		
			43 lines
		
	
	
		
			920 B
		
	
	
	
		
			Puppet
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			920 B
		
	
	
	
		
			Puppet
		
	
	
	
	
	
class salt (
 | 
						|
  $salt_master = $::fqdn
 | 
						|
) {
 | 
						|
  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,
 | 
						|
    }
 | 
						|
  }
 | 
						|
 | 
						|
  package { 'salt-minion':
 | 
						|
    ensure  => present,
 | 
						|
    require => Apt::Ppa['ppa:saltstack/salt'],
 | 
						|
  }
 | 
						|
 | 
						|
  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'],
 | 
						|
    ],
 | 
						|
  }
 | 
						|
}
 |