Puppet notify资源参数(二十八)
notify资源notify资源主要用于输出puppet的辅助提示信息,在puppet的执行过程中通过这些辅助信息了解执行的过程,它并不会改变任何操作状态.
参数:
1
2
3
4
5
6
notify { 'resource title':
name => # (namevar) An arbitrary tag for your own reference; the...
message=> # The message to be sent to the...
withpath => # Whether to show the full object path. Defaults...
# ...plus any applicable metaparameters.
}
name:标示名.
messages:输出描述信息.
withpath:是否显示完整对象路径。
示例:
1
2
3
4
5
6
# cat notify.pp
$sum = 8 + 4
notify {"sum":
message => "${sum}",
withpath => true,
}
运行结果:
1
2
3
4
5
# puppet apply notify.pp
Notice: Compiled catalog for sh-web1.localdomain in environment production in 0.05 seconds
Notice: /Stage/Main/Notify/message: 12
Notice: /Stage/Main/Notify/message: defined 'message' as '12'
Notice: Finished catalog run in 0.03 seconds
页:
[1]