Defined Type: wildfly::patch::online

Defined in:
manifests/patch/online.pp

Overview

Applies patches online. Requires server restart.

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.



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

define wildfly::patch::online (
  Stdlib::Unixpath $source,
  Boolean          $override_all = false,
  Array            $override     = [],
  Array            $preserve     = [],
) {
  $args = wildfly::patch_args($source, $override_all, $override, $preserve)

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

  ~> wildfly::restart { "Restart for patch ${title}":
  }
}