简体   繁体   English

傀儡r10k:Nginx Package

[英]Puppet r10k : Nginx Package

I want to download the latest package/version of Nginx but it seems my code does not pulling the latest Nginx (1.18), any thought that I should add?我想下载 Nginx 的最新包/版本,但似乎我的代码没有提取最新的 Nginx (1.18),有什么想法我应该添加吗? here's my code.这是我的代码。

class nginx {

  package { 'nginx':
    ensure => 'latest',
  }

  service { 'nginx':
    ensure  => running,
    enable  => true,
    require => Package['nginx'],
  }
}

As John Bollinger has pointed out, you'll be getting the latest nginx package from the package repository for your version of Ubuntu, which may not be the actual latest version. As John Bollinger has pointed out, you'll be getting the latest nginx package from the package repository for your version of Ubuntu, which may not be the actual latest version.

If you use the Forge NGINX Puppet module , you will automatically get the latest version installed from the official NGINX package repository.如果您使用Forge NGINX Puppet 模块,您将自动从官方 NGINX package 存储库安装最新版本。 Just add只需添加

mod 'puppet-nginx', '3.0.0'

to your Puppetfile and then rather than writing your own nginx class, include the Forge module from your manifest.到您的Puppetfile ,然后从清单中包含 Forge 模块,而不是编写您自己的nginx class。

include nginx

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

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