Forum: CFEngine Help Subject: variable expansion in commands / args Author: bernhard.gl...@ecologic.eu Link to topic: https://cfengine.com/forum/read.php?3,26122,26122#msg-26122
hi all, could anybody help me with a hint on how to expand a variable in the command realm? I have a variable "munki_manifestname" now I need to execute a command using the content of this variable as part of the argument. --- snipp --- var: classa:: munki_manifestname string => "mani_client"; classb:: munki_manifestname string => "mani_admin"; ... commands: execute_write_new_manifest:: "/usr/bin/defaults" args => "write /Path arg1 $(munki_manifestname)"; --- snapp --- that fails because $(munki_manifestname) stays a string and won't get expanded. Is there any way to have cf variables as command arguments? TIA best Bernhard _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine