- Mastering Puppet 5
- Ryan Russell Yates Jason Southgate
- 45字
- 2021-07-16 17:46:16
Checking the input value against a newvalues array
We can also validate the provided value of the property with an array of values using the newvalues method, as shown in the following code:
Puppet::Type.newtype(:mynewtype) do
...
newparam(:override) do
defaultto :true
newvalues(:true, :false)
end
...
end