Hi Bas,
The meta keyword has indeed been added.
The error I get when trying to manually start the promise:
root@testdebian1:~# cf-agent -f
/var/cfengine/masterfiles/services/autorun/sudoers.cf -KI
error: Can't stat file
'/var/cfengine/masterfiles/services/autorun/libraries/cfengine_stdlib.cf'
for parsing. (stat: No such file or directory)
error: Policy failed validation with command
'"/var/cfengine/bin/cf-promises" -c
"/var/cfengine/masterfiles/services/autorun/sudoers.cf"'
error: Failsafe condition triggered. Interactive session
detected, skipping failsafe.cf execution.
error: Error reading CFEngine policy. Exiting...
Contents of sudo.cf:
body common control
{
bundlesequence => { "sudoers" };
inputs => { "libraries/cfengine_stdlib.cf" };
}
bundle agent sudoers
{
meta:
"tags" slist => { "autorun" };
# Define the master location of the sudoers file
vars:
"master_location" string => "/var/cfengine/masterfiles";
# Copy the master sudoers file to /etc/sudoers
files:
"/tmp/sudoers" # change to /etc/sudoers to use in
production
comment => "Make sure the sudo configuration is secure
and up to date",
perms => mog("440","root","root"),
copy_from =>
secure_cp("$(master_location)/sudoers","$(sys.policy_hub)");
}
Best regards,
Kasper