This repository was archived by the owner on Dec 26, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +125
-47
lines changed Expand file tree Collapse file tree 6 files changed +125
-47
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ driver :
3+ name : vagrant
4+
5+ provisioner :
6+ name : ansible_playbook
7+ test_repo_uri : https://github.com/hardening-io/tests-ssh-hardening.git
8+ hosts : all
9+ require_ansible_repo : false
10+ require_ansible_omnibus : true
11+ require_chef_for_busser : false
12+ require_ruby_for_busser : false
13+ ansible_verbose : true
14+ roles_path : ../ansible-ssh-hardening/
15+ playbook : default.yml
16+
17+ platforms :
18+ - name : ubuntu-12.04
19+ driver_config :
20+ box : opscode-ubuntu-12.04
21+ box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box
22+ - name : ubuntu-14.04
23+ driver_config :
24+ box : opscode-ubuntu-14.04
25+ box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box
26+ - name : centos-6.4
27+ driver_config :
28+ box : opscode-centos-6.4
29+ box_url : https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
30+ - name : centos-6.5
31+ driver_config :
32+ box : opscode-centos-6.5
33+ box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
34+ - name : oracle-6.4
35+ driver_config :
36+ box : oracle-6.4
37+ box_url : https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel64-64.box
38+ - name : oracle-6.5
39+ driver_config :
40+ box : oracle-6.5
41+ box_url : https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel65-64.box
42+ - name : debian-6
43+ driver_config :
44+ box : debian-6
45+ box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-6.0.10_chef-provisionerless.box
46+ - name : debian-7
47+ driver_config :
48+ box : debian-7
49+ box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box
50+ - name : debian-8
51+ driver_config :
52+ box : debian-8
53+ box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.1_chef-provisionerless.box
54+
55+ verifier :
56+ name : inspec
57+ sudo : true
58+ inspec_tests :
59+ - https://github.com/dev-sec/tests-ssh-hardening
60+
61+ suites :
62+ - name : ssh-ansible_1.9
63+ provisioner :
64+ ansible_version : 1.9.4
65+ - name : ssh-ansible_latest
Original file line number Diff line number Diff line change 11---
22driver :
3- name : vagrant
3+ name : docker
4+ use_sudo : false
5+ provision_command :
6+ - " mkdir /var/run/sshd"
7+
8+ transport :
9+ max_ssh_sessions : 5
410
511provisioner :
612 name : ansible_playbook
@@ -15,45 +21,39 @@ provisioner:
1521 roles_path : ../ansible-ssh-hardening/
1622 playbook : default.yml
1723
18- verifier :
19- name : inspec
20- sudo : true
21- inspec_tests :
22- - https://github.com/dev-sec/tests-ssh-hardening
23-
2424platforms :
2525- name : ubuntu-12.04
26- driver_config :
27- box : opscode-ubuntu-12.04
28- box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box
26+ driver :
27+ image : ubuntu:12.04
2928- name : ubuntu-14.04
30- driver_config :
31- box : opscode-ubuntu-14.04
32- box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box
33- - name : centos-6.4
34- driver_config :
35- box : opscode-centos-6.4
36- box_url : https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
37- - name : centos-6.5
38- driver_config :
39- box : opscode-centos-6.5
40- box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box
41- - name : oracle-6.4
42- driver_config :
43- box : oracle-6.4
44- box_url : https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel64-64.box
45- - name : oracle-6.5
46- driver_config :
47- box : oracle-6.5
48- box_url : https://storage.us2.oraclecloud.com/v1/istoilis-istoilis/vagrant/oel65-64.box
29+ driver :
30+ image : ubuntu:14.04
31+ - name : ubuntu-16.04
32+ driver :
33+ image : ubuntu:16.04
34+ - name : centos-6.6
35+ driver :
36+ image : centos:6.6
37+ - name : centos-6.7
38+ driver :
39+ image : centos:6.7
40+ - name : centos-7
41+ driver :
42+ image : centos:7
43+ privileged : true
44+ run_command : /usr/sbin/init
4945- name : debian-7
50- driver_config :
51- box : debian-7
52- box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-7.8_chef-provisionerless.box
46+ driver :
47+ image : debian:7
5348- name : debian-8
54- driver_config :
55- box : debian-8
56- box_url : https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_debian-8.1_chef-provisionerless.box
49+ driver :
50+ image : debian:8
51+
52+ verifier :
53+ name : inspec
54+ sudo : true
55+ inspec_tests :
56+ - https://github.com/dev-sec/tests-ssh-hardening
5757
5858suites :
5959- name : ssh-ansible_1.9
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ group :integration do
2323 gem 'kitchen-sharedtests' , '~> 0.2.0'
2424 gem 'kitchen-sync'
2525 gem 'kitchen-transport-rsync'
26+ gem 'kitchen-docker'
2627end
2728
2829group :openstack do
Original file line number Diff line number Diff line change @@ -51,15 +51,20 @@ This role provides secure ssh-client and ssh-server configurations.
5151
5252## Local Testing
5353
54- For local testing you can use vagrant and Virtualbox of VMWare to run tests locally. You will have to install Virtualbox and Vagrant on your system. See [ Vagrant Downloads] ( http://downloads.vagrantup.com/ ) for a vagrant package suitable for your system. For all our tests we use ` test-kitchen ` . If you are not familiar with ` test-kitchen ` please have a look at [ their guide] ( http://kitchen.ci/docs/getting-started ) .
54+ The preferred way of locally testing the role is to use Docker. You will have to install Docker on your system. See [ Get started] ( https://docs.docker.com/ ) for a Docker package suitable to for your system.
55+
56+ You can also use vagrant and Virtualbox or VMWare to run tests locally. You will have to install Virtualbox and Vagrant on your system. See [ Vagrant Downloads] ( http://downloads.vagrantup.com/ ) for a vagrant package suitable for your system. For all our tests we use ` test-kitchen ` . If you are not familiar with ` test-kitchen ` please have a look at [ their guide] ( http://kitchen.ci/docs/getting-started ) .
5557
5658Next install test-kitchen:
5759
5860``` bash
5961# Install dependencies
6062gem install bundler
6163bundle install
64+ ```
6265
66+ ### Testing with Docker
67+ ```
6368# fast test on one machine
6469bundle exec kitchen test default-ubuntu-1204
6570
@@ -71,6 +76,18 @@ bundle exec kitchen create default-ubuntu-1204
7176bundle exec kitchen converge default-ubuntu-1204
7277```
7378
79+ ### Testing with Virtualbox
80+ ```
81+ # fast test on one machine
82+ KITCHEN_YAML=".kitchen.vagrant.yml" bundle exec kitchen test default-ubuntu-1204
83+
84+ # test on all machines
85+ KITCHEN_YAML=".kitchen.vagrant.yml" bundle exec kitchen test
86+
87+ # for development
88+ KITCHEN_YAML=".kitchen.vagrant.yml" bundle exec kitchen create default-ubuntu-1204
89+ KITCHEN_YAML=".kitchen.vagrant.yml" bundle exec kitchen converge default-ubuntu-1204
90+ ```
7491For more information see [ test-kitchen] ( http://kitchen.ci/docs/getting-started )
7592
7693## FAQ / Pitfalls
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,13 +9,18 @@ galaxy_info:
99 - name : EL
1010 versions :
1111 - 6
12+ - 7
13+ - name : Oracle Linux
14+ versions :
15+ - 6
16+ - 7
1217 - name : Ubuntu
1318 versions :
1419 - precise
1520 - trusty
21+ - xenial
1622 - name : Debian
1723 versions :
18- - squeeze
1924 - wheezy
2025 - jessie
2126 galaxy_tags :
You can’t perform that action at this time.
0 commit comments