Defined Type: wildfly::patch::offline

Defined in:
manifests/patch/offline.pp

Overview

Applies patches offline.

Parameters:

  • source (Stdlib::Unixpath)

    path to patch file.

  • override_all (Boolean) (defaults to: false)

    Whether it should solve all conflicts by overriding current files.

  • override (Array) (defaults to: [])

    List of files to be overridden.

  • preserve (Array) (defaults to: [])

    List of files to be preserved.



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'manifests/patch/offline.pp', line 9

define wildfly::patch::offline (
  Stdlib::Unixpath $source,
  Boolean          $override_all = false,
  Array            $override     = [],
  Array            $preserve     = [],
) {
  require wildfly::install

  $args = wildfly::patch_args($source, $override_all, $override, $preserve)

  exec { "Patch ${title}":
    command     => "jboss-cli.sh 'patch apply ${args}'",
    unless      => "jboss-cli.sh 'patch history' | grep -q ${title}",
    path        => ['/bin', '/usr/bin', '/sbin', "${wildfly::dirname}/bin"],
    environment => "JAVA_HOME=${wildfly::java_home}",
  }
}