Puppet Class: mcollective

Defined in:
manifests/init.pp

Overview

Manage AIO based Marionette Collective

Parameters:

  • plugintypes (Array[String[1]])

    The list of plugin directories to create under libdir

  • plugin_classes (Array[String[1]])

    The list of plugins to install via classes

  • plugin_classes_exclude (Array[String[1]]) (defaults to: [])

    A list of plugins not to install

  • server_config (Hash) (defaults to: {})

    A hash of config items to set in the server.cfg

  • client_config (Hash) (defaults to: {})

    A hash of config items to set in the client.cfg

  • common_config (Hash) (defaults to: {})

    A hash of config items to set in both client.cfg and server.cfg

  • bindir (Stdlib::Absolutepath)

    Where to create symlinks for our commands

  • libdir (Stdlib::Absolutepath)

    The directory where plugins will go in

  • configdir (Stdlib::Absolutepath)

    Root directory to config files

  • facts_refresh_interval (Integer)

    Minutes between fact refreshes, set to 0 to disable cron based refreshes

  • rubypath (Stdlib::Absolutepath)

    Path to the ruby executable

  • collectives (Array[Mcollective::Collective])

    A list of collectives the node belongs to

  • client_collectives (Array[Mcollective::Collective]) (defaults to: $collectives)

    A list of collectives the client has access to, defaults to the same as the node

  • main_collective (Optional[Mcollective::Collective]) (defaults to: undef)

    The main collective to use, last in the list of ‘$collectives` by default

  • client_main_collective (Optional[Mcollective::Collective]) (defaults to: undef)

    The main collective to use on the client, ‘$main_collective` by default

  • facts_pidfile (Optional[Stdlib::Absolutepath])

    PID file path for locking fact refresh to a single execution

  • plugin_owner (Optional[String[1]])

    The default user who will own plugin files

  • plugin_group (Optional[String[1]])

    The default group who will own plugin files

  • plugin_mode (Optional[Stdlib::Filemode])

    The default mode plugin files will have

  • plugin_executable_mode (Optional[Stdlib::Filemode])

    The default mode executable plugin files will have

  • required_directories (Array[Stdlib::Absolutepath]) (defaults to: [])

    Any extra directories that should be created before copying plugins and configuration

  • policy_default (Mcollective::Policy_action)

    When managing plugin policies this will be the default allow/deny

  • site_policies (Array[Mcollective::Policy]) (defaults to: [])

    Policies to apply to all agents after any module specific policies

  • rpcutil_policies (Array[Mcollective::Policy]) (defaults to: [])

    Policies to apply to the special rpcutil agent

  • choria_util_policies (Array[Mcollective::Policy]) (defaults to: [])

    Policies to apply to the special choria_util agent

  • scout_policies (Array[Mcollective::Policy]) (defaults to: [])

    Policies to apply to the special scout agent

  • client (Boolean)

    Install client files on this node

  • server (Boolean)

    Install server files on this node

  • purge (Boolean)

    When true will remove unmanaged files from the $configdir/plugin.d, $configdir/policies and $libdir

  • gem_source (Optional[String[1]]) (defaults to: undef)

    where to find gems, useful for local gem mirrors

  • manage_bin_symlinks (Boolean) (defaults to: false)

    Enables creating symlinks in the bin dir for the mco command

  • plugin_file_transfer_type (Enum['content', 'source']) (defaults to: 'source')

    enum to configure global type for file resources in plugins. could be overwritten for every plugin in their defined resource

  • gem_options (Optional[Array[String]]) (defaults to: [])

    Define install_options for gem packages

  • default_rego_policy_source (Stdlib::Filesource)
  • gem_provider (String[1])


36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'manifests/init.pp', line 36

class mcollective (
  Array[String[1]] $plugintypes,
  Array[String[1]] $plugin_classes,
  Array[String[1]] $plugin_classes_exclude = [],
  Hash $server_config = {},
  Hash $client_config = {},
  Hash $common_config = {},
  Stdlib::Absolutepath $bindir,
  Stdlib::Absolutepath $libdir,
  Stdlib::Absolutepath $configdir,
  Stdlib::Absolutepath $rubypath,
  Boolean $manage_bin_symlinks = false,
  Integer $facts_refresh_interval,
  Array[Mcollective::Collective] $collectives,
  Array[Mcollective::Collective] $client_collectives = $collectives,
  Optional[Mcollective::Collective] $main_collective = undef,
  Optional[Mcollective::Collective] $client_main_collective = undef,
  Optional[Stdlib::Absolutepath] $facts_pidfile,
  Optional[String[1]] $plugin_owner,
  Optional[String[1]] $plugin_group,
  Optional[Stdlib::Filemode] $plugin_mode,
  Optional[Stdlib::Filemode] $plugin_executable_mode,
  Array[Stdlib::Absolutepath] $required_directories = [],
  Mcollective::Policy_action $policy_default,
  Array[Mcollective::Policy] $site_policies = [],
  Array[Mcollective::Policy] $rpcutil_policies = [],
  Array[Mcollective::Policy] $choria_util_policies = [],
  Array[Mcollective::Policy] $scout_policies = [],
  Stdlib::Filesource $default_rego_policy_source,
  Boolean $client,
  Boolean $server,
  Boolean $purge,
  Optional[String[1]] $gem_source = undef,
  String[1] $gem_provider,
  Enum['content', 'source'] $plugin_file_transfer_type = 'source',
  Optional[Array[String]] $gem_options = [],
) {
  $factspath = "${configdir}/generated-facts.yaml"

  contain mcollective::plugin_dirs
  contain mcollective::config
  contain mcollective::facts

  contain $plugin_classes - $plugin_classes_exclude
}