1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
#######################################################
#
# Test delete a package
#
#######################################################
body common control
{
inputs => { "../default.cf.sub" };
bundlesequence => { "test_warn_delete_pkg" };
version => "1.0";
}
#######################################################
bundle agent test_warn_delete_pkg
{
packages:
"bash"
package_policy => "delete",
package_method => mock_warn_delete_pkg,
package_select => ">=",
package_version => "4.2.8",
package_architectures => {"x86_64"};
}
body package_method mock_warn_delete_pkg
{
package_changes => "individual";
package_list_command => "$(G.printf) 'bash-4.2.8-x86_64'";
package_list_name_regex => "^([^-]+)";
package_list_version_regex => "^[^-]+-([^-]+)";
package_list_arch_regex => "^[^-]+-[^-]+-(.*)";
package_installed_regex => ".*";
package_add_command => "$(G.false)";
package_update_command => "$(G.false)";
package_delete_command => "$(G.true)";
package_verify_command => "$(G.false)";
}
|