I cannot test this easily as it seems to only happen when the puppet service runs. It does not happen when run interactively as an administrator. Once an administrator does a 'puppet agent -t' the issue does not recur for some time, perhaps until the computer reboots for Windows Updates. Here is the simple example file
file { 'chocolatey.config':
path => "C:/ProgramData/chocolatey/config/chocolatey.config",
content => template('yum/chocolatey.config.erb'),
owner => 'SYSTEM',
group => 'Administrators',
mode => '0775',
ensure => present,
}
I do not get this issue with other files, but most Windows computers end up logging:
Failed to set group to 'S-1-5-32-544': Failed to initialize ACL: The parameter is incorrect.
Would using a different group help? Changing mode to 775 instead of '0775'?
I have been suggested before I ought to use a different method, but then how do I actually deploy the file? From my understanding, I HAVE to provide owner, group and mode on Windows for the file to be deployed. Is this no longer the case?