# Cfengine code snippet by Valentin Hoebel (valentin@xenuser.org) # Created on August 10th 2012; Simple example for making use of environment variables # You are free to use and share this code snippet in any way you want. body common control { version => "1.0"; inputs => { "cfengine_stdlib.cf" }; bundlesequence => { "demonstrate_env_variable_usage" }; } bundle agent demonstrate_env_variable_usage { vars: "current_dir" string => getenv("PWD", "50"); files: "/etc/motd" comment => "Ensure that /etc/motd contains nonsense", edit_line => insert_lines("Greetings from $(current_dir)!"); }