Puppet Class: distelli::deps::darwin

Inherits:
distelli::agent
Defined in:
manifests/deps/darwin.pp

Overview



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'manifests/deps/darwin.pp', line 1

class distelli::deps::darwin inherits distelli::agent {

  if $::distelli::agent::user_shell == undef {
    $shell = '/bin/bash'
  }
  else {
    $shell = $::distelli::agent::user_shell
  }

  if $::distelli::agent::user_home {
    $home = $::distelli::agent::user_home
  }
  else {
    $home = '/Users/distelli'
  }

  if $::distelli::agent::user_password {
    $password = $::distelli::agent::user_password
  }
  else {
    $password = undef
  }

  user { 'distelli' :
    ensure   => present,
    comment  => 'Distelli User',
    home     => $home,
    shell    => $shell,
    password => $password,
  }

  file { '/private/etc/sudoers.d/distelli' :
    ensure  => file,
    content => "distelli ALL=(ALL) NOPASSWD:ALL\nDefaults:distelli !requiretty\n",
    mode    => '0400',
    owner   => 'root',
    require => User['distelli'],
  }

}