Cfengine configuration directory

Strategies

Relevant classes: any

Strategies are introduced as of cfengine version 2.0.x. A strategy is a probability distribution of classes. In game theoretical language, a strategy is a mixed strategy. Each class labels are pure strategy, or a possible course of action. A strategy is defined as follows:

strategies:

  { my_strategy_alias

  class1: "2"
  class2: "3"
  class3: "$(value)"
  class4: "6"
  class5: "1"
  }

tidy:

 class1.Hr00::  

   /home pat=*.mp3 age=0

 class2.Hr02::  

   /home pat=*.mp3 age=0

Formally, each strategy is a class which is defined with a certain probability. An integer weight is provided in quotes to represent the probability of the classes. When cfengine is run, it picks on of the classes from each strategy by `throwing dice' to select a strategy at random. Think of Star Trek, when the Captain says "rotate shield modulations". Using strategies, you can choose different ways of configuring or protecting a system, at random, thus confounding environmental attempts to break (into) the system.

Note that each strategy has a formal name, but this name is not used to attach a strategy to an action, as in filters, or acls. Rather, think of this simply as a way of defining classes at random, from a set.

Back to documentation