简体   繁体   中英

let puppet install packages from a specific repository

is there a way to tell puppet to install a package from a specific repository? I'd like to do something like 'aptitude -t testing install vim' in puppet.

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'.

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:

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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