add prepare cookbook for package integration test

This commit is contained in:
Christoph Hartmann 2015-10-22 19:57:17 +02:00
parent f15d05fd22
commit ea0814939a
3 changed files with 30 additions and 0 deletions

View file

@ -4,3 +4,5 @@ maintainer 'Chef Software, Inc.'
maintainer_email 'support@chef.io' maintainer_email 'support@chef.io'
description 'This cookbook prepares the test operating systems' description 'This cookbook prepares the test operating systems'
version '1.0.0' version '1.0.0'
depends 'apt'
depends 'yum'

View file

@ -3,3 +3,5 @@
# author: Dominik Richter # author: Dominik Richter
# #
# prepare all operating systems with the required configuration # prepare all operating systems with the required configuration
include_recipe('os_prepare::package')

View file

@ -0,0 +1,26 @@
# encoding: utf-8
# author: Christoph Hartmann
# author: Dominik Richter
#
# installs everything to do the package test
case node['platform']
when 'ubuntu'
include_recipe('apt')
package 'curl'
when 'rhel', 'centos', 'fedora'
include_recipe('yum')
# TODO: support DNF natively
# Special care for fedora 22, since dnf is not officially supported yet
# https://github.com/chef/chef/issues/3201
if node['platform_version'] == 22
execute 'dnf install -y yum'
end
package 'curl'
when 'freebsd'
# do nothing
# TODO: implement Freebsd packages
end