Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-27 Thread Alexander Fortin
On 11/24/11 5:58 AM, Iain Sutton wrote: Aside: do you perhaps mean source => file("/home/$::realuser/puppet/files/smb.conf"), instead of content => file("/home/$::realuser/puppet/files/smb.conf"), ? No, I'm using content =>, and it works if I use actual strings instead of variables. Do

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-23 Thread Iain Sutton
Aside: do you perhaps mean source => file("/home/$::realuser/puppet/files/smb.conf"), instead of content => file("/home/$::realuser/puppet/files/smb.conf"), ? Do you have any lines like: notice("the value of realuser is ${realuser} and ::realuser is ${::realuser} ") in your manifest to confi

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-22 Thread Alexander Fortin
On 11/22/11 7:37 PM, Aaron Grewell wrote: Curly braces perhaps? content => file("/home/${realuser}/puppet/files/smb.conf"), Tried both with ${realuser} and with ${::realuser}, no luck. -- Alexander Fortin http://about.me/alexanderfortin/ -- You received this message because you are subscribe

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-22 Thread Aaron Grewell
Curly braces perhaps? content => file("/home/${realuser}/puppet/files/smb.conf"), On Tue, Nov 22, 2011 at 10:15 AM, Alexander Fortin wrote: > On 11/21/11 9:28 PM, jcbollinger wrote: >> >> What if you spell it like so: >> >> mysersource { "/etc/$::myvariable": ensure =>  present } >> >> ? > > This

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-22 Thread Alexander Fortin
On 11/21/11 9:28 PM, jcbollinger wrote: What if you spell it like so: mysersource { "/etc/$::myvariable": ensure => present } ? This is the actual code now: file { "/etc/samba/smb.conf": ensure => "present", content => file("/home/$::realuser/puppet/files/smb.conf"), require =>

[Puppet Users] Re: Multiple nodes.pp files

2011-11-21 Thread jcbollinger
On Nov 21, 8:05 am, Alexander Fortin wrote: > On 11/21/11 11:13 AM, Luke Bigum wrote:> Yes, big difference. > > > The 'import' function will literally add the contents of a manifest file > > into where your import statement is, it's like a 'include "woof.h"' in > > C/C++ or "source /etc/sysconfi

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-21 Thread Evan Hisey
On Thu, Nov 17, 2011 at 2:04 PM, Ramin K wrote: > Tech documentation is littered with examples that illustrate exactly > one thing and call it day. 99% of the power of any system comes from > learning to combine multiple functions. I chose that example because > it illustrates regex, using regex i

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-21 Thread Alexander Fortin
On 11/21/11 11:13 AM, Luke Bigum wrote: Yes, big difference. The 'import' function will literally add the contents of a manifest file into where your import statement is, it's like a 'include "woof.h"' in C/C++ or "source /etc/sysconfig/woof" in Bash. It should really never be used anywhere outs

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-21 Thread Luke Bigum
Yes, big difference. The 'import' function will literally add the contents of a manifest file into where your import statement is, it's like a 'include "woof.h"' in C/C++ or "source /etc/sysconfig/woof" in Bash. It should really never be used anywhere outside of site.pp to add classes and func

Re: [Puppet Users] Re: Multiple nodes.pp files

2011-11-19 Thread Hugo Deprez
Thank you Ramin, I used import "nodes/*.pp" this is exactly what I wanted. I am quite confuse about the difference between "import" and "include" (used for a module). is there a real difference ? Regards, Hugo On 17 November 2011 21:04, Ramin K wrote: > Tech documentation is littered with

[Puppet Users] Re: Multiple nodes.pp files

2011-11-17 Thread Ramin K
Tech documentation is littered with examples that illustrate exactly one thing and call it day. 99% of the power of any system comes from learning to combine multiple functions. I chose that example because it illustrates regex, using regex in a node as well as case statements, adding classes based

[Puppet Users] Re: Multiple nodes.pp files

2011-11-16 Thread Ramin K
I think it's fairly common to put something like this in your site.pp if you like separate node files which I prefer. import "nodes/*.pp" You can also use regex in your node files to further simplify though if you're doing a lot of logic here you should probably start thinking about an ENC. fe.p