我正在玩木偶并注意到这种行为。
# puppet resource file /etc/passwd
file { '/etc/passwd':
ensure => 'file',
content => '{md5}7a63b133e1a086d9f35c2014b3b09218',
ctime => 'Thu Jan 10 17:16:11 -0700 2013',
group => '0',
mode => '644',
mtime => 'Thu Jan 10 17:16:11 -0700 2013',
owner => '0',
selrange => 's0',
selrole => 'object_r',
seltype => 'etc_t',
seluser => 'system_u',
type => 'file',
}
VS
# puppet resource file /etc/passwd provider=posix
file { '/etc/passwd':
ensure => 'file',
selrange => 's0',
selrole => 'object_r',
seltype => 'etc_t',
seluser => 'system_u',
}
这是在Linux系统上,文件提供程序应该是POSIX。为什么在明确指定提供程序时输出会不同?
编辑:为命令添加了特定输出。
答案 0 :(得分:1)
Puppetlabs最近站起了他们自己的堆栈交换实例,这个问题在那里得到了解答:https://ask.puppetlabs.com/question/241/why-does-puppet-resource-behave-differently-when-specifying-the-provider/?answer=253#post-id-253