Puppet Class: boxen::config

Defined in:
manifests/config.pp

Overview

Parameters:

  • home (Any) (defaults to: undef)
  • bindir (Any) (defaults to: undef)
  • cachedir (Any) (defaults to: undef)
  • configdir (Any) (defaults to: undef)
  • datadir (Any) (defaults to: undef)
  • envdir (Any) (defaults to: undef)
  • homebrewdir (Any) (defaults to: undef)
  • logdir (Any) (defaults to: undef)
  • repodir (Any) (defaults to: undef)
  • reponame (Any) (defaults to: undef)
  • socketdir (Any) (defaults to: undef)
  • srcdir (Any) (defaults to: undef)
  • login (Any) (defaults to: undef)
  • repo_url_template (Any) (defaults to: undef)
  • download_url_base (Any) (defaults to: undef)
  • hiera_merge_hierarchy (Any) (defaults to: undef)


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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'manifests/config.pp', line 7

class boxen::config (
  $home = undef,
  $bindir = undef,
  $cachedir = undef,
  $configdir = undef,
  $datadir = undef,
  $envdir = undef,
  $homebrewdir = undef,
  $logdir = undef,
  $repodir = undef,
  $reponame = undef,
  $socketdir = undef,
  $srcdir = undef,
  $login = undef,
  $repo_url_template = undef,
  $download_url_base = undef,
  $hiera_merge_hierarchy = undef
) {
  validate_string(
    $home,
    $bindir,
    $cachedir,
    $configdir,
    $datadir,
    $envdir,
    $homebrewdir,
    $logdir,
    $repodir,
    $reponame,
    $socketdir,
    $srcdir,
    $login,
    $repo_url_template,
    $download_url_base,
  )

  file { [$home,
          $srcdir,
          $bindir,
          $cachedir,
          $configdir,
          $datadir,
          $envdir,
          $logdir,
          $socketdir]:
    ensure => directory,
    links  => follow
  }

  file { "${home}/README.md":
    source => 'puppet:///modules/boxen/README.md'
  }

  file { "${home}/env.sh":
    content => template('boxen/env.sh.erb'),
    mode    => '0755',
  }

  file { ["${envdir}/config.sh", "${envdir}/gh_creds.sh"]:
    ensure => absent,
  }

  group { 'puppet':
    ensure => present
  }

  $puppet_data_dirs = [
    "${home}/data/puppet",
    "${home}/data/puppet/graphs"
  ]

  file { $puppet_data_dirs:
    ensure => directory,
    owner  => $::boxen_user
  }
}