简体   繁体   English

Puppet软件包资源的默认提供者是什么

[英]what is the default provider of Puppet package resource

This is the code that puppet to download and install mysql. 这是木偶下载并安装mysql的代码。 But where the package is downloaded from, or what is the default provider for this package in different Operation System? 但是,从何处下载软件包,或者在不同的操作系统中此软件包的默认提供程序是什么?

package 
{ 'mysql-server':
  require => Exec['apt-update'],        # require 'apt-update' before installing
  ensure => installed,
}

When you use package resource without explicit provider Puppet tries to figure out what provider should be used based on facts. 当您在没有显式提供package情况下使用package资源时,Puppet会尝试根据事实确定应使用哪个提供程序。

At the start Puppet gathers facts about system, operating system and what is available to use. 从一开始,Puppet收集有关系统,操作系统和可用内容的事实。 Based on those facts it will use provider that is most likely to work. 基于这些事实,它将使用最有可能工作的提供程序。

You can see what facts are required for every provider to work in the package documentation page: https://docs.puppet.com/puppet/latest/type.html#package-providers 您可以在package文档页面中查看每个提供商都需要哪些事实: https : //docs.puppet.com/puppet/latest/type.html#package-providers

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

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