Puppet Function: profile::mariadb::section_params::is_writeable_dc

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

Overview

profile::mariadb::section_params::is_writeable_dc(Profile::Mariadb::Valid_section $section)Boolean

Parameters:

  • section (Profile::Mariadb::Valid_section)

Returns:

  • (Boolean)


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

function profile::mariadb::section_params::is_writeable_dc(
    Profile::Mariadb::Valid_section $section,
) >> Boolean {
    $dc = profile::mariadb::section_params::writeable_dc($section)
    $dc ? {
        'mwprimary' => $::site == mediawiki::state('primary_dc'),
        'eqiad' => $::site == $dc,
        'codfw' => $::site == $dc,
        'both' => true,
        'none' => false,
        default => fail("Unsupported writeable_dc type: ${dc}"),
    }
}