From 07ee8ecd667df8e32a75e5c58303b3c429f084c8 Mon Sep 17 00:00:00 2001 From: Christoph Hartmann Date: Thu, 15 Dec 2016 18:13:06 +0100 Subject: [PATCH] call ssh cookbook from prepare cookbook Signed-off-by: Christoph Hartmann --- .kitchen.chef.yml | 1 - .kitchen.ec2.yml | 1 - .kitchen.vagrant.yml | 1 - .kitchen.yml | 1 - test/cookbooks/os_prepare/metadata.rb | 1 + test/cookbooks/os_prepare/recipes/default.rb | 3 +++ test/cookbooks/os_prepare/recipes/ssh.rb | 7 +++++++ 7 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 test/cookbooks/os_prepare/recipes/ssh.rb diff --git a/.kitchen.chef.yml b/.kitchen.chef.yml index 619fab5a9..9f6d223f2 100644 --- a/.kitchen.chef.yml +++ b/.kitchen.chef.yml @@ -70,5 +70,4 @@ platforms: suites: - name: default run_list: - - recipe[ssh-hardening] - recipe[os_prepare] diff --git a/.kitchen.ec2.yml b/.kitchen.ec2.yml index 5b3700e35..5f47cdc5c 100644 --- a/.kitchen.ec2.yml +++ b/.kitchen.ec2.yml @@ -86,6 +86,5 @@ suites: run_list: - recipe[apt] - recipe[yum] - - recipe[ssh-hardening] - recipe[os_prepare] attributes: diff --git a/.kitchen.vagrant.yml b/.kitchen.vagrant.yml index e3c3f6edf..ea0667a86 100644 --- a/.kitchen.vagrant.yml +++ b/.kitchen.vagrant.yml @@ -33,6 +33,5 @@ suites: run_list: - recipe[apt] - recipe[yum] - - recipe[ssh-hardening] - recipe[os_prepare] attributes: diff --git a/.kitchen.yml b/.kitchen.yml index 2d82b841e..a953cdc8a 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -79,7 +79,6 @@ suites: run_list: - recipe[apt] - recipe[yum] - - recipe[ssh-hardening] - recipe[os_prepare] attributes: osprepare: diff --git a/test/cookbooks/os_prepare/metadata.rb b/test/cookbooks/os_prepare/metadata.rb index 60c748463..4f1b8a3cb 100644 --- a/test/cookbooks/os_prepare/metadata.rb +++ b/test/cookbooks/os_prepare/metadata.rb @@ -11,3 +11,4 @@ depends 'runit' depends 'postgresql' depends 'httpd', '~> 0.2' depends 'windows' +depends 'ssh-hardening' diff --git a/test/cookbooks/os_prepare/recipes/default.rb b/test/cookbooks/os_prepare/recipes/default.rb index 04096947e..1d85a33a4 100644 --- a/test/cookbooks/os_prepare/recipes/default.rb +++ b/test/cookbooks/os_prepare/recipes/default.rb @@ -7,6 +7,9 @@ # container preparation include_recipe('os_prepare::prep_container') +# confgure ssh +include_recipe('os_prepare::ssh') + # basic tests include_recipe('os_prepare::file') include_recipe('os_prepare::mount') unless node['osprepare']['docker'] diff --git a/test/cookbooks/os_prepare/recipes/ssh.rb b/test/cookbooks/os_prepare/recipes/ssh.rb new file mode 100644 index 000000000..3146ed4d0 --- /dev/null +++ b/test/cookbooks/os_prepare/recipes/ssh.rb @@ -0,0 +1,7 @@ +# encoding: utf-8 +# author: Christoph Hartmann +# +# installs ssh +return if node['platform_family'] == 'windows' + +include_recipe 'ssh-hardening::default'