Installing packages from a third-party repository
Even though the Ubuntu package repository contains many up-to-date packages, you might bump into situations in which either the package you need is missing or outdated. In such cases, you can either use third-party repositories or your own repositories (containing self-made packages). Chef makes it simple to use additional APT repositories with the apt
cookbook.
Getting ready
Make sure that you have a cookbook called my_cookbook
and that the run_list
of your node includes my_cookbook
, as described in the Creating and using cookbooks recipe in Chapter 1, Chef Infrastructure.
Let's retrieve the required apt
cookbook:
- Add it to
Berksfile
:mma@laptop:~/chef-repo $ subl Berksfile
source 'https://supermarket.getchef.com' ...
Get Chef: Powerful Infrastructure Automation now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.