On Wednesday, December 5, 2012 5:50:30 PM UTC-6, Jakov Sosic wrote:
>
> On 12/06/2012 12:24 AM, iamauser wrote: 
> > Thanks, but I have tried that already, it doesn't help. 
> > 
>
> You have another syntax problem that escaped me first time I reviewed 
> your code... 
>
> This is the problem: 
>
> link_files { '$mynamevar' : 
>    $linkcase => "var", 
> } 
>
> You should remove quotes around array, dollar sign in front of linkcase, 
> and replace doublequotes around simple string with singleqoutes: 
>
> link_files { $mynamevar : 
>   linkcase => 'var', 
> } 
>


First of all, I didn't copy paste my code, rather typed it here, so 
indentation should be ignored. 
You are right, dollar sign shouldn't be there, and I think it was a typo on 
my part that I failed to notice. I disagree with your comment about 
singlequote or doublequote for "var". That shouldn't be an issue here as it 
will consider this as string of characters.
 

>
> Really, your code is a mess... You have doublequote where singlequotes 
> would be enough, singleqoutes where they should not be at all, dollar 
> sign in front of param in resource, you don't use two-space as 
> identation, you don't have default: {} in your case conditional, you 
> have blanks after the end of line, etc, etc... 
>
> I urge you to use 'puppet parser validate' and 'puppet-lint' to review 
> your code. It would be even better if you would use it in your 
> pre-commit hooks, so that you cannot commit code that is written bellow 
> certain standards. 
>

Thanks and I am aware of all these in practice.


 

-- 
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/-/ciTqE41wW38J.
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.

Reply via email to