What is the right way to do add-apt-repository via Chef?

If you use chef v12.9 and above, Use the apt_repository resource for managing apt repositories. If you use chef lower than v12.8, you can use APT Cookbook provided by Chef Software, Inc. This cookbook provides same LWRP
Following is the example usage of the resource:

apt_repository "nginx-php" do
  uri "http://ppa.launchpad.net/nginx/php5/ubuntu"
  distribution node['lsb']['codename']
  components ["main"]
  keyserver "keyserver.ubuntu.com"
  key "C300EE8C"
end

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)