Defined Type: wildfly::cli

Defined in:
manifests/cli.pp

Overview

Executes an arbitrary JBoss-CLI command [node-type=node-name (/node-type=node-name)*] : operation-name ['('[name=value [, name=value]*]')'] [{header (;header)*}]. This define is a wrapper for wildfly_cli that defaults to your local Wildfly installation.

Parameters:

  • command (String) (defaults to: $title)

    The actual command to execute.

  • unless (Optional[String]) (defaults to: undef)

    If this parameter is set, then this cli will only run if this command condition is met.

  • onlyif (Optional[String]) (defaults to: undef)

    If this parameter is set, then this cli will run unless this command condition is met.

  • mgmt_user (Hash[Enum['username','password'], String])
  • port_properties (Hash[Enum['management-http','management-https','ajp','http','https'], Integer[1024]])
  • ip_properties (Hash[Enum['management','public'], Stdlib::Compat::Ip_address])


9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'manifests/cli.pp', line 9

define wildfly::cli(
  Hash[Enum['username','password'], String]                                            $mgmt_user,
  Hash[Enum['management-http','management-https','ajp','http','https'], Integer[1024]] $port_properties,
  Hash[Enum['management','public'], Stdlib::Compat::Ip_address]                        $ip_properties,
  String                                                                               $command = $title,
  Optional[String]                                                                     $unless = undef,
  Optional[String]                                                                     $onlyif = undef,
) {

  $cli_info = split($title, ':')
  $cli = $cli_info[0]
  $catalina_home = $cli_info[1]

  wildfly_cli { $cli:
    command  => $command,
    username => $mgmt_user['username'],
    password => $mgmt_user['password'],
    host     => $ip_properties['management'],
    port     => $port_properties['management-http'],
    unless   => $unless,
    onlyif   => $onlyif,
  }
}