Defined Type: aem::config

Defined in:
manifests/config.pp

Overview

Define: aem::config

Configure the AEM instance with the appropriate parameter values

Do not use this defines directly.

Parameters:

  • context_root (Any)
  • debug_port (Any)
  • group (Any)
  • home (Any)
  • jvm_mem_opts (Any)
  • jvm_opts (Any)
  • osgi_configs (Any)
  • crx_packages (Any)
  • port (Any)
  • runmodes (Any)
  • sample_content (Any)
  • type (Any)
  • user (Any)


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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'manifests/config.pp', line 7

define aem::config(
  $context_root,
  $debug_port,
  $group,
  $home,
  $jvm_mem_opts,
  $jvm_opts,
  $osgi_configs,
  $crx_packages,
  $port,
  $runmodes,
  $sample_content,
  $type,
  $user
) {

  File {
    group => $group,
    owner => $user,
  }


  # Create the env script
  file { "${home}/crx-quickstart/bin/start-env":
    ensure  => file,
    content => template("${module_name}/start-env.erb"),
    mode    => '0775',
  }

  # Rename the original start script.
  file { "${home}/crx-quickstart/bin/start.orig":
    ensure  => file,
    replace => false,
    source  => "${home}/crx-quickstart/bin/start",
    mode    => '0775',
  }

  # Create the start script
  file { "${home}/crx-quickstart/bin/start":
    ensure  => file,
    content => template("${module_name}/start.erb"),
    mode    => '0775',
    require => File["${home}/crx-quickstart/bin/start.orig"],
  }

  # Create the install folder in case there are any OSGi configurations; now or in the future
  file {"${home}/crx-quickstart/install" :
    ensure => directory,
    mode   => '0775',
  }

  if $osgi_configs {

    if is_array($osgi_configs) {
      $_osgi_configs = $osgi_configs
    } else {
      $_osgi_configs = [$osgi_configs]
    }

    $_osgi_configs.each | Hash $cfg | {

      $cfg.each | $key, $values | {

        if $values['properties'] {
          $_props = $values['properties']
          $_pid = $values['pid']
        } else {
          $_props = $values
          $_pid = undef
        }

        aem::osgi::config { $key :
          group      => $group,
          home       => $home,
          pid        => $_pid,
          properties => $_props,
          type       => 'file',
          user       => $user
        }
      }
    }
  }

  if $crx_packages {
    $crx_packages.each | $pkg | {
      $_filename = basename($pkg)
      aem::crx::package { "${home}/crx-quickstart/install/${_filename}" :
        group  => $group,
        home   => $home,
        source => $pkg,
        type   => 'file',
        user   => $user
      }
    }
  }
}