Resource Type: wls_exec

Defined in:
lib/puppet/type/wls_exec.rb
Providers:
sqlplus

Overview

This resource allows you to execute a wlst command or script in the context.

This is a fallback resource. This means you should use it with care and only if there are no other Puppet types available. Here is an example on how you can use this:

wls_exec{'@/tmp/set_some_configuration.py':
  cwd         => '/tmp',
  refreshonly => true,
  logoutput   => true,
  unless      => '@/tmp/configuration_is_not_set.py',
}

This statement will first execute the ‘/tmp/configuration_is_not_set.py` script. If this script returns something, the main script (e.g. `/tmp/set_some_configuration.py`) will not be executed. If it returns nothing, the `/tmp/set_some_configuration.py` script is executed.

Here is an example of a part of the unless script:

if resource_available:
  print >>puppet, "true"

If the resource is available, you must write something to ‘puppet`. If the resource is not available, do nothing.

Formatting

Because Python is sensitive for formatting, you should take care the formatting of the main and the unless scripts. You MUST start both scripts at column 0.

You can also explicitly specify the domain:

wls_exec{'my_domain/@/tmp/set_some_configuration.py':
  cwd         => '/tmp',
  refreshonly => true,
  logoutput   => true,
  unless      => '@/tmp/configuration_is_not_set.py',
}

Parameters

  • provider

    The specific backend to use for this ‘wls_exec` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.