Created
May 10, 2014 02:18
-
-
Save vinyar/797a5e9f77585da6a167 to your computer and use it in GitHub Desktop.
Troubleshooting idempotence with registry_key resource on chef 11.8.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Attribute file: | |
default['winsecureos']['registry']['eventlog']['HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Application'] = | |
[ | |
{:name => 'MaxSize', :type => :dword, :data => '20971520'}, | |
{:name => 'RestrictGuestAccess', :type => :dword, :data => '1'}, | |
{:name => 'Retention', :type => :dword, :data => '1'}, | |
{:name => 'AutoBackupLogFiles', :type => :dword, :data => '1'} | |
] | |
Recipe: | |
node['winsecureos']['registry'].each do |kind, array| | |
array.each do |key, hash| | |
hash.each do |value| | |
registry_key kind + key + value.to_s do | |
key key | |
values [{ | |
:name => value.name, | |
:type => value.type, | |
:data => value.data | |
}] | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment