翻译自learningpuppet

1、Facts, global variables, and local variables from the current scope are available to a template as  Ruby instance variables — instead of Puppetʼs $ prefix, they have an @ prefix. (e.g. @fqdn,@memoryfree, @operatingsystem, etc.) 

     fact,全局变量和来自当前域的局部变量对于一个模板来说可用,但是作为ruby实例变量来说,他们用@前缀代替puppet的$。比如说(@fqdn,@memoryfree,@operatingsystem等)

2、Variables from other scopes can be accessed with the scope.lookupvar method, which takes a  .) 

     对于其他作用域的变量,能够通过scope.lookupvar方法访问,这种方法不用$引用一个长变量名。(比如,scope.lookupvar('apache::user'))

相关文章:

  • 2021-09-04
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-14
  • 2021-09-17
  • 2021-12-30
  • 2021-05-08
  • 2021-11-19
  • 2021-11-28
  • 2021-10-23
相关资源
相似解决方案