Hi,
[...]
> $valid_ensure_values = [ "present", "absent" ]
>
> if ! ("$::{ensure}" in $::{valid_ensure_values}) {
> $test_ = inline_template("<%=
> ($::apt-cacher-ng::params::valid_ensure_values).join(', ') %>")
>
> fail("${module_name}::server - Invalid ensure value [currently -
> ${ensure}], valid values are [$::{valid_ensure_values}]")
> }
>
> I was hoping that I could just simply do a:
>
> validate_in($::{ensure}, $::{valid_ensure_values})
>
How would that be different than using the "in" in your if statement? :)
Or, what is wrong with using if? Unless I am missing something? :)
KW
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/7ekhlWECNEcJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.