help-cfengine
[Top][All Lists]
Advanced

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

Re: list iteration?


From: Luke A. Kanies
Subject: Re: list iteration?
Date: Mon, 3 May 2004 14:26:28 -0500 (CDT)

On Mon, 3 May 2004, Mike wrote:

> What about the second part? In an editfiles: section how do you add
> to the variable such that the variable has new things to iterate
> over in the shellcommands: section?

The only way to do that is to set a class in editfiles and then react to
that in control:

control:
  AddInstallable = ( dosomething )

editfiles:
  { /path/to/file
    HashCommentLinesMatching "127.0.0.1"
    Define "dosomething"
  }

control:
  dosomething::
    var = ( newvalue )

shellcommands:
  "/bin/do something ${var}"

The only ways to set variables in cfengine are in the control action or
via methods or modules.

Luke

-- 
We either are networking, or we areNT networking...
---------------------------------------------------------------------
Luke Kanies | http://abstractive.org | http://reductiveconsulting.com




reply via email to

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