Forum: CFEngine Help Subject: Re: executable file doesn't exist. bundles processing. Author: phnakarin Link to topic: https://cfengine.com/forum/read.php?3,25667,25676#msg-25676
This warning is from syntax checker (cf-promises), not executor (cf-agent). Even though, you specify a right class to methods but it doesn't mean that it would stop cf-promises from evaluating classes/variables promises. In this case, cf-promises attempts to evaluate returnzero() becuase the promise is in any:: class. To kill the warning, we have to pass a valid condition to that bundle too, right before the promise. I suggested to create a global class in bundle common and use that class all over the policy. bundle common def { classes: any:: "custom_pack_installed" expression => fileexists("/usr/bin/customfile"); } bundle agent install_custom_pack { methods: custom_pack_installed:: "install_custom_plugins" usebundle => custom_plugins; } bundle agent custom_plugins { classes: custom_pack_installed:: "plugin" expression => returnszero("/usr/bin/customfile args | grep pluginname","useshell"); } Cheers, -- Nakarin _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine