You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.
Stephen Jones edited this page Apr 8, 2014
·
2 revisions
Extending CFEngine using 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.