Defined Type: wildfly::reload

Defined in:
manifests/reload.pp

Overview

Performs a system reload when a reload is required `server-state=reload-required`.

This define is a wrapper for `wildfly_restart` that defaults to your local Wildfly installation.
It is commonly used as a subscriber of a resource that requires reload.

Parameters:

  • retries (Integer) (defaults to: 3)

    Sets the number of retries to check if service is available.

  • wait (Integer) (defaults to: 10)

    Sets the amount of time in seconds that this resource will wait for the service to be available before a attempt.

  • username (String) (defaults to: $wildfly::mgmt_user['username'])

    Wildfly's management user to be used internally.

  • password (String) (defaults to: $wildfly::mgmt_user['password'])

    The password for Wildfly's management user.

  • host (String) (defaults to: $wildfly::properties['jboss.bind.address.management'])

    The IP address or FQDN of the JBoss Management service.

  • port (String) (defaults to: $wildfly::properties['jboss.management.http.port'])

    The port of the JBoss Management service.

  • secure (Boolean) (defaults to: $wildfly::secure_mgmt_api)


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

define wildfly::reload(
  Integer $retries  = 3,
  Integer $wait     = 10,
  String $username  = $wildfly::mgmt_user['username'],
  String $password  = $wildfly::mgmt_user['password'],
  String $host      = $wildfly::properties['jboss.bind.address.management'],
  String $port      = $wildfly::properties['jboss.management.http.port'],
  Boolean $secure   = $wildfly::secure_mgmt_api,
) {

  if $secure {
    $_port  = $wildfly::properties['jboss.management.https.port']
  }
  else {
    $_port = $port
  }

  wildfly_restart { $title:
    username => $username,
    password => $password,
    host     => $host,
    port     => $_port,
    secure   => $secure,
    retries  => $retries,
    wait     => $wait,
    reload   => true,
    require  => Service['wildfly'],
  }

}