Puppet Class: puppet::server::bootstrap::setup

Defined in:
manifests/server/bootstrap/setup.pp

Summary

Setup bootstrap and cwd paths

Overview

Setup bootstrap and cwd paths

Examples:

include puppet::server::bootstrap::setup


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
# File 'manifests/server/bootstrap/setup.pp', line 7

class puppet::server::bootstrap::setup {
  include puppet::server::bootstrap::globals

  $bootstrap_path = $puppet::server::bootstrap::globals::bootstrap_path
  $cwd = $puppet::server::bootstrap::globals::cwd

  exec { "mkdir -p ${bootstrap_path}":
    cwd     => '/',
    path    => '/usr/bin:/bin',
    creates => $bootstrap_path,
    before  => File[$bootstrap_path],
  }

  file { [$bootstrap_path, "${bootstrap_path}/ca", "${bootstrap_path}/keys"]:
    ensure => directory,
  }

  if $cwd and $cwd != $bootstrap_path {
    exec { "mkdir -p ${cwd}":
      cwd     => '/',
      path    => '/usr/bin:/bin',
      creates => $cwd,
    }

    file { $cwd:
      ensure => directory,
    }
  }
}