>
> Actually, only this last thing (and that was what I wanted to do
> first) is what really requires to set the confdir explicitly, like
>
>  cd /path/to/puppet/dir/manifests
>
> puppet --confdir /path/to/puppet/dir site.pp
>
> or without cd'ing in the manifests dir:
>
>  puppet --confdir /path/to/puppet/dir /path/to/puppet/dir/site.pp
>
> running
>
>  puppet /etc/puppet/manifests/site.pp
>
> runs just like this, I must have made something wrong elsewhere.
>
>
this is what works for me:

namespace :puppet do
  puppetmaster= 'redacted.juliansimpson.org'
  args = " --modulepath #{root}/etc/puppet/modules "
  args += " --templatedir #{root}/etc/templates "
  args += " --environment development "

  task :test do
    sh "cd etc/puppet && puppet #{args} --parseonly manifests/site.pp"
    sh "cd etc/puppet && puppet #{args} --noop manifests/site.pp   --debug"
  end

  desc "run the puppet stuff"
  task :run do
    sh "cd etc/puppet && puppet #{args} manifests/site.pp"
  end

where #{root} is

root=File.dirname(__FILE__)

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to