Puppet Class: masterless::darwin

Defined in:
manifests/darwin.pp

Overview

Set up masterless runs on Macs



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'manifests/darwin.pp', line 3

class masterless::darwin {
  $repodir = $masterless::repodir
  $bindir = $masterless::bindir
  $frequency = $masterless::frequency

  file { "${bindir}/puppet-run":
    ensure => link,
    target => "${repodir}/meta/puppet-run"
  }

  file { '/Library/LaunchDaemons/com.halyard.puppet-run.plist':
    ensure  => 'file',
    content => template('masterless/puppet-run.launchd.erb'),
    notify  =>  Exec['Puppet-run refresh launchd']
  }

  exec { 'Puppet-run refresh launchd':
    command     => 'launchctl load -wF /Library/LaunchDaemons/com.halyard.puppet-run.plist',
    refreshonly => true,
    path        => ['/usr/bin', '/bin'],
    user        => 'root'
  }
}