在CentOS系统上使用puppet安装apt-dater-host

我想使用puppet和foreman在基于Debian CentOS的系统上安装apt-dater-host。

在Debian上,软件包在标准仓库中可用 – 但是在CentOs上,情况并非如此 – 我使用了RPMsearch并获得了以下结果 。

我如何使用yum安装包?

在CentOS上,你需要find一个保存包的yum版本库,然后使用Puppet yumrepo资源将它添加到系统中。

 class aptdater { if $::osfamily == 'RedHat' { # Only install the yum repo on RH-family systems yumrepo { 'blah': ... } # Override the package to require the yum repo to be deployed first Package['apt-dater-host'] { require => Yumrepo['blah'], } } package { 'apt-dater-host': ensure => present, } }