Puppet Exec 什么 "<||>"方法? [英] Puppet Exec what "<| |>" means?

查看:44
本文介绍了Puppet Exec 什么 "<||>"方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习木偶语言并注意到一行非常有趣的代码:Exec["apt-update"] ->包<||> 在以下上下文中:

I'm learning puppet language and noticed one very intriguing line of code: Exec["apt-update"] -> Package <| |> on following context:

class manifest::module {

  exec { "apt-update":
      command => "/usr/bin/apt-get -y update",
      timeout => 3600;
  }

  package {
    ["alien", "bc", "libaio1", "unixodbc", "unzip", "rlwrap"]:
      ensure => installed;
  }

  Exec["apt-update"] -> Package <| |>
}

为什么 Exec 后面跟着 ->?最重要的是,<| 的含义是什么?|> ???

Why Exec is followed by the ->? And most important, what's the meaning of <| |> ???

推荐答案

这个表达式本质上是指示 Puppet 让任何包资源都需要apt-update"exec 资源.换句话说,Puppet 一定会在安装/清除/...一个包之前执行 apt-get update.

This expression essentially instructs Puppet to have any package resource require the "apt-update" exec resource. In other words Puppet will be sure to execute apt-get update before installing/purging/... a package.

这篇关于Puppet Exec 什么 &quot;&lt;||&gt;"方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆