Re: [Solved] [Puppet Users] Puppet throws error when evaluating block after statement

2011-11-21 Thread Evan Hisey
>
> We found, that we had some hidden, invisible characters in that line.
> Neither vim nor nano showed those characters.
>
> Problem is solved by removing and retyping the affected lines.
>
> Kind regards,
>
> Martin
>
>

Not a completely uncommon issue for some reason. I have encountered it
a few times myself.

evan

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.



[Solved] [Puppet Users] Puppet throws error when evaluating block after statement

2011-11-17 Thread Martin Alfke

On 17.11.2011, at 14:49, jcbollinger wrote:

> 
> 
> On Nov 17, 2:18 am, Martin Alfke  wrote:
>> Hi,
>> 
>> using the following manifests inside a module:
>> 
>> define base_users::usermanagement($gid='', $uid='', $groups='', $comment='', 
>> $home='', $ensure=present) {
>> 
>> if ($comment == '' ) {
>> fail('need full username')
>> }
>> 
>> }
>> 
>> when running a test:
>> 
>> tests/init.pp
>> base_users::usermanagement {
>>  'alfke':
>> gid => 1024,
>> uid => 1024,
>> comment => 'Martin Alfke',
>> 
>> }
>> 
>> The following error shows up:
>> 
>> Could not parse for environment production: Could not match  { at 
>> /Users/mea/Documents/Work/puppet/modules/base_users/manifests/usermanagemen­t2.pp:3
>>  on node martin-alfkes-macbook.local
>> 
>> Note: I am not using environments.
>> 
>> facter puppetversion
>> 2.7.6
>> 
>> [...]
>> 
>> Any hints??
>> 
>> Thank you,
>> 
>> Martin
> 
> 
> Puppet does not require parentheses around the condition of an 'if'
> statement.  Try removing those.

We found, that we had some hidden, invisible characters in that line.
Neither vim nor nano showed those characters.

Problem is solved by removing and retyping the affected lines.

Kind regards,

Martin



-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.