I'm having trouble installing YUM RPMs using the "package_file_repositories" attribute in 3.1.5 and 3.2.0. Cfengine runs "/usr/bin/yum -y install" and yum exits with error because no package is specified.
Am I doing something wrong? {{{ bundle agent example { packages: "pgdg-centos" package_policy => "add", package_method => yum_filebased; } body package_method yum_filebased { package_file_repositories => { "/repo" }; # A list of machine-local directories to search for packages package_changes => "bulk"; package_list_command => "/usr/bin/yum list installed"; # Remember to escape special characters like | package_list_name_regex => "([^.]+).*"; package_list_version_regex => "[^\s]\s+([^\s]+).*"; package_list_arch_regex => "[^.]+\.([^\s]+).*"; package_installed_regex => ".*installed.*"; package_name_convention => "$(name).$(arch)"; package_add_command => "/usr/bin/yum -y install"; package_delete_command => "/bin/rpm -e"; package_verify_command => "/bin/rpm -V"; } }}} Here is the verbose output from cf-agent: cf3> -> Package version was not specified cf3> -> Looking for (pgdg-centos,*,*) cf3> No installed packages matched (pgdg-centos,*,*) cf3> -> Looking for (pgdg-centos,*,*) cf3> No installed packages matched (pgdg-centos,*,*) cf3> Checking if package (pgdg-centos,*,*) is at the desired state (installed=0,matched=0) cf3> -> Package promises to refer to itself as "pgdg-centos.*" to the manager cf3> !! Package name contians '*' -- perhaps a missing attribute (name/version/arch) should be specified cf3> -> Package version seems to match criteria cf3> -> Schedule package for addition cf3> -> Package (pgdg-centos.*,any,any) found cf3> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> cf3> Offering these package-promise suggestions to the managers cf3> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> cf3> -> Deletion schedule... cf3> -> Addition schedule... cf3> Execute scheduled package addition cf3> Command prefix: /usr/bin/yum -y install cf3> Executing /usr/bin/yum -y install ... cf3> Q: yum -y install ...:Loaded plugins: fastestmirror cf3> Q: yum -y install ...:Error: Need to pass a list of pkgs to install cf3> Q: yum -y install ...:usage: yum [options] COMMAND cf3> Q: yum -y install ...: cf3> Q: yum -y install ...:List of Commands: cf3> Q: yum -y install ...: cf3> Q: yum -y install ...:check-update Check for available package updates cf3> Q: yum -y install ...:clean Remove cached data cf3> Q: yum -y install ...:deplist List a package's dependencies cf3> Q: yum -y install ...:downgrade downgrade a package cf3> Q: yum -y install ...:erase Remove a package or packages from your system cf3> Q: yum -y install ...:groupinfo Display details about a package group cf3> Q: yum -y install ...:groupinstall Install the packages in a group on your system cf3> Q: yum -y install ...:grouplist List available package groups cf3> Q: yum -y install ...:groupremove Remove the packages in a group from your system cf3> Q: yum -y install ...:help Display a helpful usage message cf3> Q: yum -y install ...:info Display details about a package or group of packages cf3> Q: yum -y install ...:install Install a package or packages on your system cf3> Q: yum -y install ...:list List a package or groups of packages cf3> Q: yum -y install ...:localinstall Install a local RPM cf3> Q: yum -y install ...:makecache Generate the metadata cache cf3> Q: yum -y install ...:provides Find what package provides the given value cf3> Q: yum -y install ...:reinstall reinstall a package cf3> Q: yum -y install ...:repolist Display the configured software repositories cf3> Q: yum -y install ...:resolvedep Determine which package provides the given dependency cf3> Q: yum -y install ...:search Search package details for the given string cf3> Q: yum -y install ...:shell Run an interactive yum shell cf3> Q: yum -y install ...:update Update a package or packages on your system cf3> Q: yum -y install ...:upgrade Update packages taking obsoletes into account cf3> Q: yum -y install ...: cf3> Q: yum -y install ...: cf3> Q: yum -y install ...:options: cf3> Q: yum -y install ...: -h, --help show this help message and exit cf3> Q: yum -y install ...: -t, --tolerant be tolerant of errors cf3> Q: yum -y install ...: -C run entirely from cache, don't update cache cf3> Q: yum -y install ...: -c [config file] config file location cf3> Q: yum -y install ...: -R [minutes] maximum command wait time cf3> Q: yum -y install ...: -d [debug level] debugging output level cf3> Q: yum -y install ...: --showduplicates show duplicates, in repos, in list/search commands cf3> Q: yum -y install ...: -e [error level] error output level cf3> Q: yum -y install ...: -q, --quiet quiet operation cf3> Q: yum -y install ...: -v, --verbose verbose operation cf3> Q: yum -y install ...: -y answer yes for all questions cf3> Q: yum -y install ...: --version show Yum version and exit cf3> Q: yum -y install ...: --installroot=[path] set install root cf3> Q: yum -y install ...: --enablerepo=[repo] enable one or more repositories (wildcards allowed) cf3> Q: yum -y install ...: --disablerepo=[repo] disable one or more repositories (wildcards allowed) cf3> Q: yum -y install ...: -x [package], --exclude=[package] cf3> Q: yum -y install ...: exclude package(s) by name or glob cf3> Q: yum -y install ...: --disableexcludes=[repo] cf3> Q: yum -y install ...: disable exclude from main, for a repo or for cf3> Q: yum -y install ...: everything cf3> Q: yum -y install ...: --obsoletes enable obsoletes processing during updates cf3> Q: yum -y install ...: --noplugins disable Yum plugins cf3> Q: yum -y install ...: --nogpgcheck disable gpg signature checking cf3> Q: yum -y install ...: --disableplugin=[plugin] cf3> Q: yum -y install ...: disable plugins by name cf3> Q: yum -y install ...: --enableplugin=[plugin] cf3> Q: yum -y install ...: enable plugins by name cf3> Q: yum -y install ...: --skip-broken skip packages with depsolving problems cf3> Q: yum -y install ...: --color=COLOR control whether color is used cf3> Q: yum -y install ...: cf3> Q: yum -y install ...: Plugin Options: cf3> Q: yum -y install ...: cf3> !! Finished command related to promiser "pgdg-centos" -- an error occurred (returned 1) cf3> Bulk package schedule execution failed somewhere - unknown outcome for pgdg-centos.* Thanks, Aleksey _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org https://cfengine.org/mailman/listinfo/help-cfengine