Skip to content

Instantly share code, notes, and snippets.

@fujin
Forked from anonymous/sanintized-attributes.rb
Created November 5, 2009 19:14
Show Gist options
  • Select an option

  • Save fujin/227304 to your computer and use it in GitHub Desktop.

Select an option

Save fujin/227304 to your computer and use it in GitHub Desktop.
users Mash.new unless attribute?("users")
groups Mash.new unless attribute?("groups")
ssh_keys Mash.new unless attribute?("ssh_keys")
roles Mash.new unless attribute?("roles")
groups[:admin] = {:gid => 113}
roles[:chef] = {:groups => [:admin], :sudo_groups => [:admin]}
roles[:staff] = {:groups => [:admin], :sudo_groups => [:admin]}
users[:username] = {:password => "crypt", :comment => "First Last", :uid => 2005, :groups => [ :admin ] }
ssh_keys[:username] = "ssh-rsa keydata"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment