Puppet Function: auditd::calculate_space_left
- Defined in:
-
functions/calculate_space_left.pp
- Function type:
- Puppet Language
Summary
Calculates the correct default value for 'space_left' based on the value of 'admin_space_left'.
Overview
auditd::calculate_space_left(Variant[Integer[0],Pattern['^\d+%$']] $admin_space_left) ⇒ Variant[Integer[0],Pattern['^\d+%$']]
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'functions/calculate_space_left.pp', line 5
function auditd::calculate_space_left (
Variant[Integer[0],Pattern['^\d+%$']] $admin_space_left
){
if $admin_space_left.is_a(Integer) {
$admin_space_left + 30
}
elsif $admin_space_left =~ /(\d+)%/ {
$_space_left = Integer($1) + 1
"${_space_left}%"
}
}
|