Skip to content

Instantly share code, notes, and snippets.

@vinyar
Created September 5, 2014 22:31
Show Gist options
  • Save vinyar/21eefd687e4a308b3034 to your computer and use it in GitHub Desktop.
Save vinyar/21eefd687e4a308b3034 to your computer and use it in GitHub Desktop.
attribute structure that I like
attributes:
default['winsecureos']['services']['foo'] = {
:action => [ :stop, :disable ],
:name => 'ALG',
:description => 'Application Layer Gateway Service'}
default['winsecureos']['services']['foo1'] = {
:action => [ :stop, :manual ],
:name => 'AppMgmt',
:description => 'Application Management'}
Recipe:
node['winsecureos']['services'].each do |key, value|
ge_win_services value.description do
name value.name
description value.description
action value.action
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment