On Monday, January 4, 2016 at 10:12:48 AM UTC-6, linux script wrote:
>
> Hi,
>
> The below code works fine for me.
>


I don't see how that could be, as your code contains syntax errors, and it 
appears to reference a non-existent defined type named 
"profile::config::params".

 

> However, I want to reframe the code by using define statement in params.pp 
> instead of config.pp.
>


Defined type definitions should appear at top scope in their own 
manifests.  Although it is syntactically allowed, it is poor form to nest 
defined type definitions inside class definitions.  Thus, a defined type in 
module "profile" with simple name "user" should take this general form:

*modules/profile/manifests/user.pp:*

define profile::user($param1, $param2) {
  # ...
}

 

> I wanted to define it in params.pp so that I can use only variables in 
> config.pp(ex:I am using $home/$name/.bashrc as file path in config which 
> should be something like $bashrc if I would be able to use define in 
> params.pp) 
>


You are not making sense.  Lexical nesting has no relationship to the 
accessibility of class variables.

It's unclear to me whether any of that actually speaks to your issue, 
however.  If not, then you'll have to explain more clearly what you are 
trying to do, because I'm not catching it.  I mean, I understand in a 
general sense what your configuration objective is, but I'm not sure I 
understand what your actual question is.


John

-- 
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/2043e299-78c2-4db9-a704-b96f60457b39%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to