-
Notifications
You must be signed in to change notification settings - Fork 0
Modules
Modules allow you to expose additional information to CFEngine for use in policy. This is extremely useful as I will show. In our environment we use Oracle VM as our hypervisor. Oracle VM has a pretty cool feature that allows you to send messages to a guest from the manage server. For more details please see the following blog post https://blogs.oracle.com/wim/entry/oracle_vm_messages.
##get_ovmd_vars
This module allows me to inject variables via vm_messages into policy as follows:-
sendVmMessage Vm name=guest key=cfengine.vars.myvar message=value log=no
The module recognises the cfengine name in the key and that we are injecting a variable, the message determines the value of the variable. The module stores this in /var/cfengine/state/ovmd_vars_data so it is persistent and available on subsequent CFEngine agent runs.