mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Further modernize the cookbook and remove legacy setup
Remove container setup that comes for free with the dokken containers now Use the new openssl resource names Remove all the encoding statements that even rubocop doesn't recommend anymore Remove some compatibility with centos-5 and ubuntu 15.10 Signed-off-by: Tim Smith <tsmith@chef.io>
This commit is contained in:
parent
8fcef84820
commit
4b3095dac2
19 changed files with 5 additions and 49 deletions
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Stephan Renatus
|
||||
|
||||
include_recipe 'runit::default'
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Stephan Renatus
|
||||
|
||||
directory '/etc/init' do
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
|
||||
case node['platform_family']
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Stephan Renatus
|
||||
|
||||
case node['platform']
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
# prepare all operating systems with the required configuration
|
||||
|
||||
apt_update if platform_family?('debian')
|
||||
|
||||
# inject the current inspec gem for use with audit cookbook
|
||||
# this is generated via Rake test:integration
|
||||
|
@ -29,9 +29,6 @@ end
|
|||
# set a static node uuid for our testing nodes
|
||||
Chef::Config[:chef_guid] = uuid_from_string(node.name)
|
||||
|
||||
# container preparation
|
||||
include_recipe('os_prepare::prep_container')
|
||||
|
||||
# confgure ssh
|
||||
include_recipe('os_prepare::ssh')
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
|
||||
if platform_family?('rhel', 'debian', 'fedora')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Stephan Renatus
|
||||
|
||||
if platform_family?('rhel', 'debian', 'fedora')
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Omar Irizarry
|
||||
#
|
||||
# change a few Windows registry keys for testing purposes
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
# installs everything to do the package test
|
||||
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
apt_update
|
||||
package 'curl'
|
||||
when 'rhel', 'fedora', 'amazon'
|
||||
package 'curl'
|
||||
when 'freebsd'
|
||||
# do nothing
|
||||
# TODO: implement Freebsd packages
|
||||
end
|
||||
package 'curl'
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
# encoding: utf-8
|
||||
# author: Stephan Renatus
|
||||
#
|
||||
# installs everyting for the postgres tests
|
||||
|
||||
# hw-cookbooks/postgresql is tested on these platforms
|
||||
# sous-chefs/postgresql is tested on these platforms
|
||||
case node['platform']
|
||||
when 'ubuntu', 'centos'
|
||||
|
||||
# also skip it on ubuntu 15.10, because the cookbook is not supported
|
||||
# with `enable_pgdg_apt` yet
|
||||
return if node['platform_version'] == "15.10"
|
||||
# skip it on centos 5, because ca-certificates is not available
|
||||
return if node['platform_version'] == "5"
|
||||
|
||||
node.default['postgresql']['enable_pgdg_apt'] = true
|
||||
node.default['postgresql']['config']['listen_addresses'] = 'localhost'
|
||||
node.default['postgresql']['password']['postgres'] = 'md506be11be01439cb4abd537e454df34ea' # "inspec"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
# prepares container for normal use :-)
|
||||
|
||||
# if package lsb-release & procps is not installed
|
||||
# chef returns an empty node['lsb']['codename']
|
||||
package %w(procps lsb-release) if platform_family?('debian')
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Alex Pop
|
||||
# author: Christoph Hartmann
|
||||
#
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
#
|
||||
# installs ssh
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
if node['platform_family'] != 'windows'
|
||||
|
||||
openssl_x509 '/tmp/mycert.pem' do
|
||||
openssl_x509_request '/tmp/mycert.pem' do
|
||||
common_name 'www.f00bar.com'
|
||||
org 'Foo Bar'
|
||||
org_unit 'Lab'
|
||||
|
@ -8,7 +8,7 @@ if node['platform_family'] != 'windows'
|
|||
expire 360
|
||||
end
|
||||
|
||||
openssl_rsa_key '/tmp/server.key' do
|
||||
openssl_rsa_private_key '/tmp/server.key' do
|
||||
key_length 2048
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue