install_yum_repo added

This commit is contained in:
Tobias Herre 2023-12-07 13:13:24 +01:00
parent 14159249ef
commit 081219a8dc
1 changed files with 17 additions and 0 deletions

17
lib.cf
View File

@ -210,6 +210,23 @@ reports:
} }
bundle agent install_yum_repo(name,content)
{
files:
"/etc/yum.repos.d/$(name).repo"
create => "true",
content => $(content),
classes => if_repaired("yum_repo_$(name)_repaired"),
handle => "yum_repo_$(name)_installed";
commands:
"yum_repo_$(name)_repaired"::
"dnf"
args => "makecache",
contain => wmde_cmd_useshell;
}
bundle agent install_apt_repo(name,repo_src,key_src,key_name) bundle agent install_apt_repo(name,repo_src,key_src,key_name)