【问题标题】:Add exclude to existing yum repo configuration with puppet使用 puppet 将排除添加到现有的 yum 存储库配置
【发布时间】:2016-11-15 23:25:49
【问题描述】:

我正在使用 puppet 来管理一组 CentOS 5 服务器的配置。我想在 CentOS 基础 yum 存储库配置中添加一些软件包排除项。有没有办法用 puppet 做到这一点?

我将使用一些软件包的 remi repo 版本,并希望从 yum 中排除基本版本。为了启用 remi,我定义了一个 yumrepo 资源。

【问题讨论】:

    标签: centos puppet yum


    【解决方案1】:

    你可以在yumrepo中使用exclude参数

    yumrepo { 'centos_base' :
        baseurl => "...",
        enabled => 1,
        priority => 1,
        exclude => "package-name",
    }
    

    您还可以在安装软件包时要求特定的yumrepo

    package { "package-name" :
      ensure => installed,
      require => Yumrepo["RemiRepo"],
    }
    

    【讨论】:

    • 我还包括了 descrname yumrepo 参数,这似乎有效。谢谢!
    猜你喜欢
    • 2017-11-13
    • 1970-01-01
    • 2013-01-09
    • 2011-11-04
    • 2012-09-23
    • 2020-12-06
    • 1970-01-01
    • 2013-01-04
    • 2022-08-09
    相关资源
    最近更新 更多