Hi there, Just started using Puppet since yesterday, so a totally newbie question. I tried to search the answer by myself but none of the suggestions actually worked. This is how my "modules" is laid: |-- modules | |-- mySudo | | |-- files | | | `-- sudoers | | `-- manifests | | `-- init.pp The file(s), that I want to send to the client machines, is in the "files" directory. In the init.pp, according to the puppet wiki (as far as I understood), this is defined: source => "puppet:///mySudo/ sudoers" But it''s not working. I even tried with: source => "puppet:///mySudo/ files/sudoers" - that''s not working either. Does anyone know what''s I''m doing wrong? Thanks in advance for your help. Cheers!! -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On 04/14/2011 11:36 AM, Sans wrote:> Hi there, > > Just started using Puppet since yesterday, so a totally newbie > question. I tried to search the answer by myself but none of the > suggestions actually worked. This is how my "modules" is laid: > > > |-- modules > | |-- mySudo > | | |-- files > | | | `-- sudoers > | | `-- manifests > | | `-- init.pp > > > The file(s), that I want to send to the client machines, is in the > "files" directory. In the init.pp, according to the puppet wiki (as > far as I understood), this is defined: source => "puppet:///mySudo/ > sudoers" > > But it''s not working. I even tried with: source => "puppet:///mySudo/ > files/sudoers" - that''s not working either. Does anyone know what''s > I''m doing wrong? Thanks in advance for your help. Cheers!!Hi, strange, this has been wrong for quite a while. You need to add "modules" to your URL: source => "puppet:///modules/mySudo/sudoers" HTH, Felix -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks Felix, for your reply. I found this rather confusing. Just after posing my question, I figured out that the ACTUAL problem was with file (i.e. sudoers) ownership, not the path. For puppetmaster to be able to copy the file to the client, the file must be readable by "puppet_user", which is not mentioned anywhere in the wiki. Since, I copied the file in the ".../modules/<module_name>/files" directory as root and it was owned by root, file copy didn''t work. Once i changed the owner of the file to "puppet" from "root", every thing was fine. Now, on a side note, I see the URL works for both with or without "modules" in it. Are you seeing otherwise? I''m using puppet- server-0.25.5, on SL5. Cheers! On Apr 14, 1:25 pm, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote:> On 04/14/2011 11:36 AM, Sans wrote: > > > > > Hi there, > > > Just started using Puppet since yesterday, so a totally newbie > > question. I tried to search the answer by myself but none of the > > suggestions actually worked. This is how my "modules" is laid: > > > |-- modules > > | |-- mySudo > > | | |-- files > > | | | `-- sudoers > > | | `-- manifests > > | | `-- init.pp > > > The file(s), that I want to send to the client machines, is in the > > "files" directory. In the init.pp, according to the puppet wiki (as > > far as I understood), this is defined: source => "puppet:///mySudo/ > > sudoers" > > > But it''s not working. I even tried with: source => "puppet:///mySudo/ > > files/sudoers" - that''s not working either. Does anyone know what''s > > I''m doing wrong? Thanks in advance for your help. Cheers!! > > Hi, > > strange, this has been wrong for quite a while. > > You need to add "modules" to your URL: > > source => "puppet:///modules/mySudo/sudoers" > > HTH, > Felix-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Felix Frank
2011-Apr-14 13:05 UTC
Re: [Puppet Users] Re: copying file with "source" parameter
On 04/14/2011 03:00 PM, Sans wrote:> Thanks Felix, for your reply. > > I found this rather confusing. Just after posing my question, I > figured out that the ACTUAL problem was with file (i.e. sudoers) > ownership, not the path. For puppetmaster to be able to copy the file > to the client, the file must be readable by "puppet_user", which is > not mentioned anywhere in the wiki. Since, I copied the file in the > ".../modules/<module_name>/files" directory as root and it was owned > by root, file copy didn''t work. Once i changed the owner of the file > to "puppet" from "root", every thing was fine. > > Now, on a side note, I see the URL works for both with or without > "modules" in it. Are you seeing otherwise? I''m using puppet- > server-0.25.5, on SL5. Cheers!I may have been mistaken then. Were you getting ERROR 400 from your server before then? You should have been (and if so, you should have mentioned it ;-) On yet another side node - SL is at 5 by now? Wow :) Cheers, Felix -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Also, watch out for casing of your module name. It appears that ''mySudo'' works, but it is not recommended. Recommended naming for Modules (and Classes): [a-z][a-z0-9]* http://docs.puppetlabs.com/guides/modules.html#naming I was caught by this issue when I named a module in a camel-cased fashion: AbbCddd Robb On Apr 14, 6:00 am, Sans <r.santanu....@gmail.com> wrote:> Thanks Felix, for your reply. > > I found this rather confusing. Just after posing my question, I > figured out that the ACTUAL problem was with file (i.e. sudoers) > ownership, not the path. For puppetmaster to be able to copy the file > to the client, the file must be readable by "puppet_user", which is > not mentioned anywhere in the wiki. Since, I copied the file in the > ".../modules/<module_name>/files" directory as root and it was owned > by root, file copy didn''t work. Once i changed the owner of the file > to "puppet" from "root", every thing was fine. > > Now, on a side note, I see the URL works for both with or without > "modules" in it. Are you seeing otherwise? I''m using puppet- > server-0.25.5, on SL5. Cheers! > > On Apr 14, 1:25 pm, Felix Frank <felix.fr...@alumni.tu-berlin.de> > wrote: > > > > > > > > > On 04/14/2011 11:36 AM, Sans wrote: > > > > Hi there, > > > > Just started using Puppet since yesterday, so a totally newbie > > > question. I tried to search the answer by myself but none of the > > > suggestions actually worked. This is how my "modules" is laid: > > > > |-- modules > > > | |-- mySudo > > > | | |-- files > > > | | | `-- sudoers > > > | | `-- manifests > > > | | `-- init.pp > > > > The file(s), that I want to send to the client machines, is in the > > > "files" directory. In the init.pp, according to the puppet wiki (as > > > far as I understood), this is defined: source => "puppet:///mySudo/ > > > sudoers" > > > > But it''s not working. I even tried with: source => "puppet:///mySudo/ > > > files/sudoers" - that''s not working either. Does anyone know what''s > > > I''m doing wrong? Thanks in advance for your help. Cheers!! > > > Hi, > > > strange, this has been wrong for quite a while. > > > You need to add "modules" to your URL: > > > source => "puppet:///modules/mySudo/sudoers" > > > HTH, > > Felix-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Thanks Robb, for the tips. Changed all my module/class names according to the recommendation. Cheers!! On Apr 14, 11:39 pm, Robb <robb.wago...@gmail.com> wrote:> Also, watch out for casing of your module name. It appears that > ''mySudo'' works, but it is not recommended. > Recommended naming for Modules (and Classes): [a-z][a-z0-9]* > > http://docs.puppetlabs.com/guides/modules.html#naming > > I was caught by this issue when I named a module in a camel-cased > fashion: AbbCddd > > Robb-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I think you were pretty much right in this regard. Just found this in the syslog: DEPRECATION NOTICE: Files found in modules without specifying ''modules'' in file path will be deprecated in the next major release. Please fix module ''d_services'' when no 0.24.x clients are present Cheers!! On Apr 14, 1:25 pm, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote:> > Hi, > > strange, this has been wrong for quite a while. > > You need to add "modules" to your URL: > > source => "puppet:///modules/mySudo/sudoers" > > HTH, > Felix-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.