File: client.pp

package info (click to toggle)
puppet-module-puppetlabs-mysql 15.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 968 kB
  • sloc: ruby: 1,648; sh: 43; makefile: 5
file content (52 lines) | stat: -rw-r--r-- 2,385 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
52
# @summary
#   Installs and configures the MySQL client.
#
# @example Install the MySQL client
#   class {'::mysql::client':
#     package_name    => 'mysql-client',
#     package_ensure  => 'present',
#     bindings_enable => true,
#   }
#
# @param bindings_enable
#   Whether to automatically install all bindings. Valid values are `true`, `false`. Default to `false`.
# @param install_options
#   Array of install options for managed package resources. You must pass the appropriate options for the package manager.
# @param package_ensure
#   Whether the MySQL package should be present, absent, or a specific version. Valid values are 'present', 'absent', or 'x.y.z'.
# @param package_manage
#   Whether to manage the MySQL client package. Defaults to `true`.
# @param package_name
#   The name of the MySQL client package to install.
# @param package_provider
#   Specify the provider of the package. Optional. Valid value is a String.
# @param package_source
#   Specify the path to the package source. Optional. Valid value is a String
#
class mysql::client (
  Boolean                                                               $bindings_enable  = $mysql::params::bindings_enable,
  Optional[Array[String[1]]]                                            $install_options  = undef,
  Variant[Enum['present','absent'], Pattern[/(\d+)[\.](\d+)[\.](\d+)/]] $package_ensure   = $mysql::params::client_package_ensure,
  Boolean                                                               $package_manage   = $mysql::params::client_package_manage,
  String[1]                                                             $package_name     = $mysql::params::client_package_name,
  Optional[String[1]]                                                   $package_provider = undef,
  Optional[String[1]]                                                   $package_source   = undef,
) inherits mysql::params {
  include 'mysql::client::install'

  if $bindings_enable {
    class { 'mysql::bindings':
      java_enable   => true,
      perl_enable   => true,
      php_enable    => true,
      python_enable => true,
      ruby_enable   => true,
    }
  }

  # Anchor pattern workaround to avoid resources of mysql::client::install to
  # "float off" outside mysql::client
  anchor { 'mysql::client::start': }
  -> Class['mysql::client::install']
  -> anchor { 'mysql::client::end': }
}