我在玩木偶时注意到了这个行为。
# 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',
}
和
# 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。当显式指定提供程序时,为什么输出不同?
Edit:添加命令的具体输出
Puppetlabs最近建立了自己的堆栈交换实例,这个问题在那里得到了回答:https://ask.puppetlabs.com/question/241/why-does-puppet-resource-behave-differently-when-specifying-the-provider/?answer=253#post-id-253