Thanks. That seems to work to set defaults when running standalone. ( I haven't yet tested it running client/server )
It would still be handy if there was a way to pass values from the commandline. ( After I set servername, the next error was for environment, which I also now set, but that value is more likely to change than servername ) I guess as an alternative, I could try moving these default settings into another imported file. On Jan 28, 8:44 pm, Ohad Levy <ohadl...@gmail.com> wrote: > I just created a simple manifest using puppet, might work for you. > > notice $servername > if $servername == "" { > $servername = "puppet" > > } > > notice $servername > > output: > notice: Scope(Class[main]): > notice: Scope(Class[main]): puppet > > On Fri, Jan 29, 2010 at 3:23 AM, steve.majew...@gmail.com < > > > > steve.majew...@gmail.com> wrote: > > We have a client-server puppetmaster running puppetd and > > puppetmasterd, > > however I would like to test configurations locally before committing > > the changes > > on the puppetmaster. > > > Running the puppet config locally with /usr/bin/puppet mostly works. > > > The thing that fails ( which I have commented out on my local copy to > > test everything else ) > > is a erb template for puppet.conf that includes: > > > server = <%= servername %> > > > with the error: > > > Failed to parse template puppet/puppet.conf.erb: Could not find value > > for 'servername' > > > It makes sense that no longer running a puppetmasterd that servername > > is undefined. > > But is there any way I can define it so that I can run the same > > configuration files > > both locally standalone and client/server ? > > > ( I tried "--servername=" but that's not a config variable so it > > doesn't like that. ) > > > Alternatively: is there a way to make part of the code conditional on > > running in stand > > alone mode. > > > The point of all this is to be able to test my changes locally before > > committing them > > to subversion and updating them on the puppetmaster -- that would be > > more difficult > > if I have to maintain different versions of the same file. > > > -- Steve Majewski / UVA Alderman Library > > > -- > > You received this message because you are subscribed to the Google Groups > > "Puppet Users" group. > > To post to this group, send email to puppet-us...@googlegroups.com. > > To unsubscribe from this group, send email to > > puppet-users+unsubscr...@googlegroups.com<puppet-users%2bunsubscr...@google > > groups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/puppet-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.