Puppet Class: nexus::config::properties

Defined in:
manifests/config/properties.pp

Summary

A short summary of the purpose of this class

Overview

A description of what this class does

Examples:

include nexus::config::properties


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
# File 'manifests/config/properties.pp', line 7

class nexus::config::properties {
  assert_private()

  # Per the Sonatype documentation the custom nexus properties file is
  # {karaf.data}/etc/nexus.properties where {karaf.data} is the work dir
  $nexus_properties_file = "${nexus::work_dir}/etc/nexus.properties"

  # Nexus >=3.x do no necesarily have a properties file in place to
  # modify. Make sure that there is at least a minmal file there
  file { $nexus_properties_file:
    ensure => present,
  }

  file_line { 'nexus-application-host':
    path  => $nexus_properties_file,
    match => '^application-host=',
    line  => "application-host=${nexus::host}"
  }

  file_line { 'nexus-application-port':
    path  => $nexus_properties_file,
    match => '^application-port=',
    line  => "application-port=${nexus::port}"
  }

  file_line { 'nexus-work':
    path  => $nexus_properties_file,
    match => '^nexus-work=',
    line  => "nexus-work=${nexus::work_dir}"
  }
}