使用puppet安装具有依赖项的包

前端之家收集整理的这篇文章主要介绍了使用puppet安装具有依赖项的包前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我是puppet的新手,为了学习它,我创建了Puppet Master和Puppet Slave设置并配置了一个 mysql模块来在Puppet客户端上安装MysqL.下面是清单文件.
class MysqL {
    package { ["MysqL-server-5.5","libaio1","libdbd-MysqL-perl","libdbi-perl","libhtml-template-perl","libMysqLclient18","MysqL-client-5.5","MysqL-common","MysqL-server-core-5.5"]:
    ensure => present,allowcdrom => 'true',}
}

包资源包含MysqL-server的所有依赖项.但我收到以下错误.

Building dependency tree...
Reading state information...
The following extra packages will be installed:
  MysqL-common
The following NEW packages will be installed:
  libMysqLclient18 MysqL-common
0 upgraded,2 newly installed,0 to remove and 0 not upgraded.
Need to get 738 kB of archives.
After this operation,3513 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  MysqL-common libMysqLclient18
E: There are problems and -y was used without --force-yes
Error: /Stage[main]/MysqL/Package[libMysqLclient18]/ensure: change from purged to present Failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libMysqLclient18' returned 100: Reading package lists...

我也尝试添加install_options:“ – force-yes”,如错误输出中所述,但仍然遇到同样的问题.

任何有关这方面的帮助将不胜感激.

你可以尝试下面的清单.问题是您必须为apt-get添加-f和–allow-unauthenticated选项以自动解决依赖关系并安装它们.添加这些标志后,不必将每个依赖包添加到包资源.
class MysqL {
    package { ["MysqL-server-5.5"]:
        ensure          => present,allowcdrom      => 'true',install_options => ['--allow-unauthenticated','-f'],}
}
原文链接:https://www.f2er.com/javaschema/281747.html

猜你在找的设计模式相关文章