File: legacy_action_providers.pp

package info (click to toggle)
puppet-module-mistral 27.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,024 kB
  • sloc: ruby: 2,384; python: 33; makefile: 11; sh: 10
file content (51 lines) | stat: -rw-r--r-- 2,008 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
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
42
43
44
45
46
47
48
49
50
51
# == Class: mistral::legacy_action_providers
#
# Configure the legacy_action_providers config section.
#
# === Parameters
#
# [*load_action_plugins*]
#   (Optional) Enables loading actions configured in the
#   entry point "mistral.actions".
#   Defaults to $facts['os_service_default']
#
# [*load_action_generators*]
#   (Optional) Enables loading actions from action generators
#   configured in the entry point "mistral.generators".
#   Defaults to $facts['os_service_default']
#
# [*only_builtin_actions*]
#   (Optional) If True, then the legacy action provider loads
#   only the actions delivered by the Mistral project out of
#   the box plugged in with the entry point "mistral.actions".
#   This property is needed mostly for testing.'
#   Defaults to $facts['os_service_default']
#
# [*allowlist*]
#   (Optional) Allowlist with actions that is allowed to be
#   loaded, if empty all actions will be allowed.
#   Defaults to $facts['os_service_default']

# [*denylist*]
#   (Optional) Denylist with actions that is not allowed to
#   be loaded, allowlist takes precedence, if empty all actions
#   will be allowed.
#   Defaults to $facts['os_service_default']
#
class mistral::legacy_action_providers (
  $load_action_plugins    = $facts['os_service_default'],
  $load_action_generators = $facts['os_service_default'],
  $only_builtin_actions   = $facts['os_service_default'],
  $allowlist              = $facts['os_service_default'],
  $denylist               = $facts['os_service_default'],
) {
  include mistral::deps

  mistral_config {
    'legacy_action_providers/load_action_plugins':    value => $load_action_plugins;
    'legacy_action_providers/load_action_generators': value => $load_action_generators;
    'legacy_action_providers/only_builtin_actions':   value => $only_builtin_actions;
    'legacy_action_providers/allowlist':              value => join(any2array($allowlist), ',');
    'legacy_action_providers/denylist':               value => join(any2array($denylist), ',');
  }
}