Skip to content

Instantly share code, notes, and snippets.

@graudeejs
Created October 4, 2020 08:41
Show Gist options
  • Save graudeejs/729507074d83a22e18b728ae77d4641a to your computer and use it in GitHub Desktop.
Save graudeejs/729507074d83a22e18b728ae77d4641a to your computer and use it in GitHub Desktop.
cfengine3 packages issue
info: Using command line specified bundlesequence
error: Invalid or missing arguments in package_module body 'apt_get': query_installed_ifelapsed = -678 query_updates_ifelapsed = -678
error: New package promise failed sanity check.
error: Invalid or missing arguments in package_module body 'apt_get': query_installed_ifelapsed = -678 query_updates_ifelapsed = -678
error: New package promise failed sanity check.
error: Invalid or missing arguments in package_module body 'apt_get': query_installed_ifelapsed = -678 query_updates_ifelapsed = -678
error: New package promise failed sanity check.
#!/bin/env -S cf-agent --inform --bundlesequence sudo --no-lock
body common control
{
inputs => { "${sys.libdir}/stdlib.cf" };
}
bundle agent sudo
{
packages:
"sudo"
policy => "present",
version => "latest",
package_module => apt_get,
comment => "Install latest sudo";
}
@nickanderson
Copy link

@graudeejs
Copy link
Author

@nickanderson. Thank you for reply.

I managed to fixit by including def.cf, tough it wasn't intuitive as that wasn't mentioned anywhere (book, docs) etc.... Then again, I was using cfengine in a bit non-standard way :D

@nickanderson
Copy link

Yes, indeed it can be a bit difficult to tease out the differences between whats in the MPF and whats in core.

Glad you found and fixed it. Just hop in to chat or the mailing list/forum and holler if you run into tohter things.

Alwasy interested to know the non-standard ways in which people are using CFEngine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment