aboutsummaryrefslogtreecommitdiff
path: root/manifests/init.pp
blob: 5015adc51640b362fe3d889caf60bebff957f99c (plain)
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
#
# Nodo module.
#

class nodo(
  $role = $::role,
) {
  # Default execution path
  Exec { path => "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" }

  # Fileserver backup
  filebucket { server: server => lookup('puppet::daemon::server', undef, undef, "puppet.${::domain}") }
  File { backup => server }

  # Include base class
  include nodo::base

  $nodo_role = $role ? {
    ''      => 'default',
    default => $role,
  }

  # Include role class
  if defined("nodo::role::${nodo_role}") {
    class { "nodo::role::${nodo_role}": }
  }

  # Include additional classes
  lookup('classes', { merge => unique, default_value => [] }).include

  # Declare resources
  class { "nodo::resources": }
}