Hello.
I use below script to install some packages, with the words "version => "latest"", the packages were installed the latest version in the first time, but after some packages new version was released, the packages is not updated.
bundle agent install_packages
{
classes:
"packages" or => { $(packages) };
vars:
"packages" slist => { readstringlist("$(sys.workdir)/inputs/packages/packages.txt","#[^\n]*","\n",800,9000 ) };
packages:
linux.packages::
"shellinabox"; "libmodule-install-perl"; "make"; "net-tools"; "google-chrome-stable"
policy => "present",
version => "latest",
package_module => apt_get;
}
bundle agent __main__
{
methods:
"szx2_packages";
}
e.g, package: google-chrome-stable:
Current version is 105.xx
root@name:/var/cfengine/modules/packages# ./apt_get list-installed < /dev/null | grep -A2 chrome
Name=google-chrome-stable
Version=105.0.5195.125-1
Architecture=amd64
The cache of local version is 107.xx
root@name:/var/cfengine/modules/packages# ./apt_get list-updates-local < /dev/null | grep -A2 chrome
Name=google-chrome-stable
Version=107.0.5304.110-1
Architecture=amd64
After running "cf-agent -K" times and waiting for 1-2 weeks, the Chrome version is still 105.xx.
Policy server OS: CentOS 7.9.2009(core)
CFEngine version: cfengine-community-3.18.1
Client OS: Ubuntu 20.04
Could you help advise?
Thanks