惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
美团技术团队
Microsoft Security Blog
Microsoft Security Blog
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
G
Google Developers Blog
博客园 - 聂微东
爱范儿
爱范儿
博客园 - 叶小钗
J
Java Code Geeks
月光博客
月光博客
博客园 - Franky
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
Microsoft Azure Blog
Microsoft Azure Blog
The GitHub Blog
The GitHub Blog
小众软件
小众软件
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Vercel News
Vercel News
Y
Y Combinator Blog
量子位

Puppet

有 V 友参加 2015 年在 Portland 的 PuppetConf 么? 去中心化的 puppet 配置 Puppet Server 清除 Puppet Master 的 /var/lib/puppet/reports 目录下旧文件的指令 关于 Puppet Master 的性能调优 Puppet Labs 和企业级路由器厂商合作,未来可以通过 Puppet 来进行路由器配置 在基于 Debian 的发行版上使用最新的开源版本的 Puppet 关于 Puppet 2 到 3 的升级 Puppet APT 源非官方国内镜像 Puppetboard puppet agent --test 运行后的 return code Ubuntu 自带版本的 facter 无法输出 JSON? Puppet有没有办法在Windows重启后,继续执行未执行完的操作? 关于修复 puppet agent 因为网络不好而时不时 administratively disabled 的问题 Puppet 出现两个漏洞:任意代码执行、模块权限绕过,大家尽快升级! 用 Ubuntu 内置的 Puppet 的话,还能否接收到来自官方的安全更新呢? puppet占用内存不少,这个问题大家是怎么解决的? puppet-lint package 类型的 ensure 的 installed 和 present 有什么区别呢? puppet.tmbundle for TextMate 大家 Puppet 是用 Crontab 還是 Daemon 運行的呢,時間間隔多少? Install Puppet Dashboard Running Puppet Master with Passenger puppet有没有办法接收通知来触发部署? Puppet CookBook Puppet Enterprise 3.0 关于 Puppet 及其替代品 关于 Puppet Enterprise 如果 Puppet 客户端用 3.1.1 版本,但是服务器端是 2.7,会有什么问题么? 在 Mac OS X 上安装 Puppet 最好的方法是?
Puppet 里使用 define 时的依赖关系……
rrfeng · 2014-07-07 · via Puppet

module A:
define X {}
class A {
X {}
file {}
exec {}
.....
}
module B:
class B {
X {}
file {}
service {}
...
}
即在模块 A 里定义了 X ,class A 里使用了 X;在另一个模块 B 里也使用了 X。
节点配置如下:
node test {
include B
include A
Class['B'] -> Class['A']
}
---------
看起来没什么问题,但是在应用的时候会提示 X 未定义!
有两种方式可以使其正常:
1. include 的时候 A 在 B 之前;
2. -> 关系写到 include 两者之前;
--------------
疑问:
我的写法是不是不对,或者不合规范?
define 一个公用的类型应该写在哪里?如何被引用呢?
class 或者 resource 里已经有了 require 等参数指定了依赖关系(包括 -> ),那么为什么还跟配置文件内容的顺序有关系呢?不应该先分析依赖关系再执行吗?
一个想法是 define X 应该写到 class A 里面,也就是 A::X 这样给其他模块使用,细想了一下上述问题仍然会存在!
求解惑。