简体   繁体   English

让puppet从特定存储库安装软件包

[英]let puppet install packages from a specific repository

is there a way to tell puppet to install a package from a specific repository? 有没有办法告诉p从特定存储库安装软件包? I'd like to do something like 'aptitude -t testing install vim' in puppet. 我想在puppet中执行“ aptitude -t testing install vim”之类的操作。

The reason why I want to do this is that I want to install specific packages from debian 'testing' repository, but by default only use 'stable'. 我要这样做的原因是,我想从debian“测试”存储库中安装特定的软件包,但默认情况下仅使用“稳定”。

Currently I have the 'testing' repository pinned with a priority of -10, so apt won't install packages from it without me explicitly telling it to do so: 目前,我的“测试”存储库的优先级固定为-10,因此,在没有明确告知我这样做的情况下,apt不会从中安装软件包:

Package: *                                                                                                                                                                                             
Pin: release a=stable
Pin-Priority: 990 

Package: *
Pin: release a=testing
Pin-Priority: -10

I'm using puppet 2.6.2 on debian-based systems. 我在基于debian的系统上使用puppet 2.6.2。

尝试puppetlabs-apt模块并使用apt :: force

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM