[root@centos53 ~]# ralsh user osmond ensure=present notice: /User[osmond]/ensure: created user { ''osmond'': ensure => ''present'', uid => ''501'', gid => ''501'', password => ''!!'', shell => ''/bin/bash'', home => ''/home/osmond'' } [root@centos53 ~]# ralsh exec "echo mypasswd |passwd osmond --stdin" path="/bin:/usr/bin:/usr/sbin" err: Could not create echo mypasswd |passwd osmond --stdin: ''echo mypasswd |passwd osmond --stdin'' is both unqualifed and specified no search path /usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:51:in `fail'': ''echo mypasswd |passwd osmond --stdin'' is both unqualifed and specified no search path (Puppet::Error) from /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:617:in `validatecmd'' from /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:426:in `validate'' from /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:2367:in `initialize'' from /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1129:in `new'' from /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1129:in `create'' from /usr/bin/ralsh:231 [root@centos53 ~]# ralsh exec "/bin/echo mypasswd | /usr/bin/passwd osmond --stdin" exec { ''/bin/echo mypasswd | /usr/bin/passwd osmond --stdin'': returns => ''notrun'' } Why? Anybody can tell me? -- =========================[osmond http://sinosmond.com] [osmond sinosmond@gmail.com] [osmond sinosmond@hotmail.com] --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Andrew Shafer
2009-Oct-14 01:11 UTC
[Puppet Users] Re: a problem about exec type and ralsh
Liang, The message is telling you. The exec must be fully qualified or have a path. It''s the same behavior in Puppet proper. I''m glad to see you experimenting with ralsh. Please open any issues you find using it. Thanks, Andrew On Tue, Oct 13, 2009 at 1:03 PM, Liang Osmond <sinosmond@gmail.com> wrote:> > [root@centos53 ~]# ralsh user osmond ensure=present > notice: /User[osmond]/ensure: created > user { ''osmond'': > ensure => ''present'', > uid => ''501'', > gid => ''501'', > password => ''!!'', > shell => ''/bin/bash'', > home => ''/home/osmond'' > } > > [root@centos53 ~]# ralsh exec "echo mypasswd |passwd osmond --stdin" > path="/bin:/usr/bin:/usr/sbin" > err: Could not create echo mypasswd |passwd osmond --stdin: ''echo > mypasswd |passwd osmond --stdin'' is both unqualifed and specified no > search path > /usr/lib/ruby/site_ruby/1.8/puppet/util/errors.rb:51:in `fail'': ''echo > mypasswd |passwd osmond --stdin'' is both unqualifed and specified no > search path (Puppet::Error) > from /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:617:in > `validatecmd'' > from /usr/lib/ruby/site_ruby/1.8/puppet/type/exec.rb:426:in > `validate'' > from /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:2367:in `initialize'' > from /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1129:in `new'' > from /usr/lib/ruby/site_ruby/1.8/puppet/type.rb:1129:in `create'' > from /usr/bin/ralsh:231 > > [root@centos53 ~]# ralsh exec "/bin/echo mypasswd | /usr/bin/passwd > osmond --stdin" > exec { ''/bin/echo mypasswd | /usr/bin/passwd osmond --stdin'': > returns => ''notrun'' > } > > > Why? Anybody can tell me? > -- > =========================> [osmond http://sinosmond.com] > [osmond sinosmond@gmail.com] > [osmond sinosmond@hotmail.com] > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---