I''m using the external_nodes functionality to read in a flat file of a
node''s configuration. Currently said file is a straight yaml file
(just to
keep things simple). The place I''m currently stuck is in doing some
more
advance node configurations and placing that data in the yaml file. For
example:
node ''foo'' {
$var1 = ''lfkajdflkjd''
include test
include root_password
package { [ "request-tracker3.6",
"libdatetime-perl", "xml-core",
"rt3.6-apache2",
"libmailtools-perl",
"libhtml-format-perl", "file",
"libcompress-zlib-perl",
"libio-socket-ssl-perl",
"libterm-readline-gnu-perl",
"libterm-readline-perl-perl",
"libapache2-mod-fcgid" ]:
ensure => installed,
}
}
The first part of this translates very easily:
---
classes:
- test
- root_password
parameters:
var1: ''lfkajdflkjd''
but then I get lost in how to represent the rest of my manifest.
would it be:
----
package:
foo:
ensure: installed
or
-----
package:
[ foo, bar, baz ]:
ensure: installed
or something similar (that last one may be completly off).
The packages example is just 1 there is also the case of custom defines that
I want to set at a node level and so on.
Thanks,
C
P.S.
Puppet rocks... I''m hooked.
--
stickm@gmail.com
-==< Stick >==-
_______________________________________________
Puppet-users mailing list
Puppet-users@madstop.com
https://mail.madstop.com/mailman/listinfo/puppet-users
On Jul 18, 2007, at 10:06 PM, Chris MacLeod wrote:> I''m using the external_nodes functionality to read in a flat file > of a node''s configuration. Currently said file is a straight yaml > file (just to keep things simple). The place I''m currently stuck > is in doing some more advance node configurations and placing that > data in the yaml file. For example: > > node ''foo'' { > $var1 = ''lfkajdflkjd'' > include test > include root_password > package { [ "request-tracker3.6", > "libdatetime-perl", "xml-core", " rt3.6-apache2", > "libmailtools-perl", > "libhtml-format-perl", "file", "libcompress-zlib- > perl", > "libio-socket-ssl-perl", "libterm-readline-gnu-perl", > "libterm-readline-perl-perl", "libapache2-mod- > fcgid" ]: > ensure => installed, > } > } > > The first part of this translates very easily: > --- > classes: > - test > - root_password > parameters: > var1: ''lfkajdflkjd'' > > but then I get lost in how to represent the rest of my manifest. >Unless something has changed since I dug through the external_nodes code a couple of weeks ago (or my grasp of ruby is more tenuous than I thought), classes and parameters are the only things you can specify with external_nodes. The rest of your manifest would have to be included by putting it into a class that you can include. -- Jason Kohles email@jasonkohles.com http://www.jasonkohles.com/ "A witty saying proves nothing." -- Voltaire
On Jul 19, 2007, at 8:37 AM, Jason Kohles wrote:> Unless something has changed since I dug through the external_nodes > code a couple of weeks ago (or my grasp of ruby is more tenuous than > I thought), classes and parameters are the only things you can > specify with external_nodes. The rest of your manifest would have to > be included by putting it into a class that you can include.You are exactly right. -- "They called me mad, and I called them mad, and damn them, they outvoted me." -- Nathaniel Lee, on being consigned to a mental institution, circa 17th c. --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com