Hi Matthew: On Tue, Nov 24, 2015 at 12:02 PM, Matthew Ceroni <matthewcer...@gmail.com> wrote:
> Working on migrating my manifests to work with Puppet 4.0. Currently on > 3.8 and have started to experiment with the future parser (probably not so > much future anymore). > > I am stuck on an error that is being reported. > > Error: Could not retrieve catalog from remote server: Error 400 on SERVER: > Evaluation Error: Error while evaluating a Function Call, ensure parameter > must be specified at > /etc/puppet/environments/sandbox/modules/sudo/manifests/init.pp:51:2 on > node op1227 > > The code is a simple check and fail if not met > > if ! ($ensure in [ 'present', 'absent' ]) { > fail("sudo 'ensure' parameter must be set to either 'absent' or > 'present'") > } > > Fail is expected to fail the parse, but I'd expect the given error message to match up with what was returned by the server. What's the value of $ensure at evaluation time? Perhaps changing the error message to something like "'$ensure' is not a valid value for parameter \$ensure: expected either 'absent' or 'present'" so it's easily displayed in the error might help debug this. > It isn't liking something about the function call fail. > > Any help would be appreciated. > > Thanks > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to puppet-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/CA%2BNsY5iN4%3DjYvXnppOdnw_KLNZZtunauoF8kodryXLwYcohEhA%40mail.gmail.com > <https://groups.google.com/d/msgid/puppet-users/CA%2BNsY5iN4%3DjYvXnppOdnw_KLNZZtunauoF8kodryXLwYcohEhA%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/CACZQQfPAKWAyffwxkPFW9nY-Rz0Z2TFa11BfUbsA9CH%3DYBR_RA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.