ome centos stuff

This commit is contained in:
Tobias Herre 2023-10-29 02:09:15 +02:00
parent b5d641aceb
commit 26a000a947
1 changed files with 27 additions and 8 deletions

35
lib.cf
View File

@ -215,12 +215,17 @@ vars:
methods: methods:
do_install:: do_install::
"any" usebundle => install_wget;
"any" usebundle => wmde_install_packages(@(pkgs),"apt_repo"); "any" usebundle => wmde_install_packages(@(pkgs),"apt_repo");
commands: commands:
do_install:: do_install::
"/bin/sh" "/bin/sh"
args => "$(sys.workdir)/inputs/$(def.wmde_libdir)/scripts/install-php-repo.sh $(name) $(repo_src) $(key_src) $(key_name)"; args => "$(sys.workdir)/inputs/$(def.wmde_libdir)/scripts/install-php-repo.sh $(name) $(repo_src) $(key_src) $(key_name)",
depends_on => {
"wget_pkgs_installed",
"apt_repo_pkgs_installed"
};
} }
@ -248,19 +253,33 @@ bundle agent install_system_repos
classes: classes:
centos:: centos::
"centos_9_and_later" expression => isgreaterthan("$(sys.os_version_major)", "8") ; "centos_9_and_later" expression => isgreaterthan("$(sys.os_version_major)", "8") ;
vars:
"pkgs" slist => {};
centos::
"pkgs" slist => {
"epel-release"
};
commands: commands:
vars:
# centos::
# "pkgs" slist => {
# "epel-release"
# };
# !centos::
# "pkgs" slist => {},
# handle => "system_repos_pkgs_installed";
commands:
centos::
"/usr/bin/yum"
args => "install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(sys.os_version_major).noarch.rpm",
if => not(returnszero("rpm -q epel-release > /dev/null","useshell")),
handle=>"system_repos_pkgs_installed";
centos_9_and_later:: centos_9_and_later::
"/usr/bin/dnf" "/usr/bin/dnf"
inform => "false", inform => "false",
args => "config-manager --set-enabled crb"; args => "config-manager --set-enabled crb";
methods: methods:
"any" usebundle => wmde_install_packages(@(pkgs),"system_repos"); # "any" usebundle => wmde_install_packages(@(pkgs),"system_repos");
reports: reports:
} }