Created
July 8, 2016 16:23
-
-
Save hartfordfive/bd32dae4b8bed6dc77e27f4919aebec9 to your computer and use it in GitHub Desktop.
Easily specifying different packages based on OS in Chef
This file contains hidden or 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
| packages = value_for_platform_family( | |
| %w(rhel fedora suse) => %w(pcre-devel), | |
| %w(gentoo) => [], | |
| %w(default) => %w(libpcre3 libpcre3-dev) | |
| ) | |
| packages.each do |p| | |
| package p do | |
| action :install | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment