converge
converge copied to clipboard
Implicit parameters for switch statements
Opening this for further discussion:
It would be nice to have a parameter that we can match on for switch statements without having to include it in every predicate. For example it would be nice to be able to say:
switch "{{platform.LinuxDistribution}}" "linux-stuff" {
case "ubuntu" "configure-ubuntu" { }
case "redhat" "configure-redhat" { }
case "centos" "configure-centos" { }
default { /* generic linux configuration */ }
}
maybe:
switch "linux-stuff" {
of = "{{platform.LinuxDistribution}}" // a value to compare against. Better name suggestions appreciated.
case "ubuntu" "configure-ubuntu" { }
case "redhat" "configure-redhat" { }
case "centos" "configure-centos" { }
default { /* generic linux configuration */ }
}