Puppet Function: profile::mariadb::section_params::is_alert_critical

Defined in:
modules/profile/functions/mariadb/section_params/is_alert_critical.pp
Function type:
Puppet Language

Overview

profile::mariadb::section_params::is_alert_critical(Profile::Mariadb::Valid_section $section, Profile::Mariadb::Role $role)Boolean

Parameters:

  • section (Profile::Mariadb::Valid_section)
  • role (Profile::Mariadb::Role)

Returns:

  • (Boolean)


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'modules/profile/functions/mariadb/section_params/is_alert_critical.pp', line 1

function profile::mariadb::section_params::is_alert_critical(
    Profile::Mariadb::Valid_section $section,
    Profile::Mariadb::Role $role,
) >> Boolean {
    case $role {
        'slave', 'master': {
            profile::mariadb::section_params::is_writeable_dc($section)
        }
        'standalone': {
            # Hack for es{1,2,3}
            $::site == mediawiki::state('primary_dc')
        }
        default: {
            fail("Unsupported mysql_role: ${role}")
        }
    }
}