help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

passing all vars to module or shellcommand


From: Luke A. Kanies
Subject: passing all vars to module or shellcommand
Date: Wed, 22 Jan 2003 20:59:22 -0600 (CST)

Hi all,

Is there some way to pass all configured variables to a shellcommand or
module?  I'd prefer something that would allow me to have cfengine set
all of its variables as environment variables, such that commands it
spawned (such as modules) would inherit those values.

It seems that the only way I can pass variables right now is by specifying
them manually, but I want to have a module that performs a bunch of
operations, and I won't know when I set up the actionsequence exactly
which variables should be passed.

Basically, I just want to be able to set a variable in the cfengine
configs and give the modules access to that variable.  Is this possible
right now?

The closest it looks like I can come right now is by making a single
variable and having it contain all of the variable values:

argument = ( "" ) # cfengine acts strangely with un-inited vars

argument = ( "${argument}--var=value" )
argument = ( "${argument}--othervar=othervalue" )

This is pretty kludgy, and doesn't allow me to transparently access a
variable's value both within and outside of cfengine.

And yes, I know I can pass the variables as arguments, but I don't want to
have to change the actionsequence just because I added a variable I want
passed.

Luke

-- 
'Fire them. Fire every single person who ever worked on [Microsoft] Word. If
they're no longer in Redmond, find out where they work and make their boss
fire them. TP their houses. Take away their stock options and hack into
their 401(k) accounts, changing all their long-range holdings into Overseas
Tech Investments.'  --Wired online




reply via email to

[Prev in Thread] Current Thread [Next in Thread]