Defined Type: simianarmy::chaos_properties::asg
- Defined in:
- manifests/chaos_properties/asg.pp
Summary
Write properties for a specific Autoscaling group (ASG) to the `chaos.properties` file.Overview
Copyright © 2017-2019 Shine Solutions Group, unless otherwise noted.
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 |
# File 'manifests/chaos_properties/asg.pp', line 38
define simianarmy::chaos_properties::asg (
String $path = $::simianarmy::chaos_properties::path,
Boolean $enabled = false,
String $probability = '1.0',
String $max_terminations_per_day = '1.0',
Variant[String, Undef] $owner_email = undef,
) {
File_line {
path => $path,
}
$line_prefix = "simianarmy.chaos.ASG.${title}"
file_line { "${title}.enabled":
line => "${line_prefix}.enabled = ${enabled}",
match => "${line_prefix}.enabled",
}
if $enabled {
file_line {
"${title}.probability":
line => "${line_prefix}.probability = ${probability}",
match => "${line_prefix}.probability";
"${title}.maxTerminationsPerDay":
line => "${line_prefix}.maxTerminationsPerDay = ${max_terminations_per_day}",
match => "${line_prefix}.maxTerminationsPerDay";
}
if $owner_email != undef {
file_line {
"${title}.notification.enabled":
line => "${line_prefix}.notification.enabled = true",
match => "${line_prefix}.notification.enabled";
"${title}.ownerEmail":
line => "${line_prefix}.ownerEmail = ${owner_email}",
match => "${line_prefix}.ownerEmail";
}
}
}
}
|