inspec 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -2
- data/README.md +5 -1
- data/bin/os +23 -0
- data/examples/kitchen-ansible/.kitchen/default-centos-71.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/default-ubuntu-1204.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/default-ubuntu-1404.yml +6 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-centos-71/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1204/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-ansible/.kitchen/kitchen-vagrant/kitchen-kitchen-ansible-default-ubuntu-1404/Vagrantfile +9 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-centos-71.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1204.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1404.log +4 -0
- data/examples/kitchen-ansible/.kitchen/logs/kitchen.log +8 -0
- data/examples/kitchen-ansible/Gemfile.lock +154 -0
- data/examples/kitchen-chef/.kitchen/default-centos-71.yml +6 -0
- data/examples/kitchen-chef/.kitchen/default-ubuntu-1204.yml +6 -0
- data/examples/kitchen-chef/.kitchen/default-ubuntu-1404.yml +6 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/Vagrantfile +9 -0
- data/examples/kitchen-chef/.kitchen/logs/default-centos-71.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1204.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1404.log +4 -0
- data/examples/kitchen-chef/.kitchen/logs/kitchen.log +8 -0
- data/examples/kitchen-chef/Berksfile.lock +11 -0
- data/examples/kitchen-chef/Gemfile.lock +223 -0
- data/examples/kitchen-puppet/.bundle/config +2 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-centos-71.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1204.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1404.log +5 -0
- data/examples/kitchen-puppet/.kitchen/logs/kitchen.log +5 -0
- data/examples/kitchen-puppet/.librarian/puppet/config +2 -0
- data/examples/kitchen-puppet/Gemfile.lock +174 -0
- data/examples/kitchen-puppet/Puppetfile.lock +2 -0
- data/examples/profile/libraries/.DS_Store +0 -0
- data/examples/test-kitchen/.kitchen/logs/default-centos-71.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1204.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1404.log +5 -0
- data/examples/test-kitchen/.kitchen/logs/kitchen.log +5 -0
- data/examples/test-kitchen/Berksfile.lock +11 -0
- data/examples/test-kitchen/Gemfile.lock +233 -0
- data/inspec.gemspec +2 -2
- data/lib/.DS_Store +0 -0
- data/lib/extras/compliance/README.md +15 -0
- data/lib/extras/compliance/compliance.rb +245 -0
- data/lib/inspec/metadata.rb +3 -1
- data/lib/inspec/profile.rb +2 -0
- data/lib/inspec/profile_context.rb +34 -63
- data/lib/inspec/resource.rb +23 -0
- data/lib/inspec/runner.rb +17 -35
- data/lib/inspec/runner_mock.rb +31 -0
- data/lib/inspec/runner_rspec.rb +94 -0
- data/lib/inspec/targets/dir.rb +2 -4
- data/lib/inspec/version.rb +1 -1
- data/{test/unit/mock/profiles/complete-meta/test/.gitkeep → lib/resources/certificate.rb} +0 -0
- data/lib/resources/command.rb +1 -1
- data/lib/resources/postgres_session.rb +10 -15
- data/{test/unit/mock/profiles/custom-resource/test/.gitkeep → lib/resources/private_key.rb} +0 -0
- data/lib/resources/registry_key.rb +10 -6
- data/lib/resources/service.rb +232 -63
- data/test/chefdk/.gitignore +16 -0
- data/test/chefdk/.kitchen.yml +27 -0
- data/test/chefdk/Policyfile.rb +16 -0
- data/test/chefdk/README.md +4 -0
- data/test/chefdk/chefignore +100 -0
- data/test/chefdk/metadata.rb +7 -0
- data/test/chefdk/recipes/default.rb +5 -0
- data/test/chefdk/spec/spec_helper.rb +2 -0
- data/test/chefdk/spec/unit/recipes/default_spec.rb +20 -0
- data/test/chefdk/test/integration/default/serverspec/default_spec.rb +9 -0
- data/test/chefdk/test/integration/helpers/serverspec/spec_helper.rb +8 -0
- data/test/docker_run.rb +5 -1
- data/test/docker_test.rb +1 -2
- data/test/helper.rb +1 -0
- data/test/integration/.kitchen/default-aws-linux.yml +4 -0
- data/test/integration/.kitchen/default-centos-7.yml +4 -0
- data/test/integration/.kitchen/default-debian-8.yml +4 -0
- data/test/integration/.kitchen/default-fedora-22.yml +4 -0
- data/test/integration/.kitchen/default-redhat-65.yml +4 -0
- data/test/integration/.kitchen/default-redhat-71.yml +4 -0
- data/test/integration/.kitchen/default-suse-11sp3.yml +4 -0
- data/test/integration/.kitchen/default-suse-12.yml +4 -0
- data/test/integration/.kitchen/default-ubuntu-1204.yml +3 -0
- data/test/integration/.kitchen/default-ubuntu-1404.yml +4 -0
- data/test/integration/.kitchen/default-windows-2012.yml +1 -0
- data/test/integration/.kitchen/default-windows-2012r2.yml +2 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67-i386/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-modernIE-w10-edge/Vagrantfile +8 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-windows-2012R2-matt/Vagrantfile +8 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-new-ubuntu-1404/Vagrantfile +9 -0
- data/test/{unit/mock/profiles/empty/metadata.rb → integration/.kitchen/logs/default-aws-linux.log} +0 -0
- data/test/integration/.kitchen/logs/default-centos-511-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-511.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-67-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-67.log +2 -0
- data/test/integration/.kitchen/logs/default-centos-7.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-71.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-6010-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-6010.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-78-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-78.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-8.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-81-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-debian-81.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-21-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-21.log +2 -0
- data/test/integration/.kitchen/logs/default-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/default-freebsd-102.log +2 -0
- data/test/integration/.kitchen/logs/default-freebsd-93.log +2 -0
- data/test/integration/.kitchen/logs/default-mint-172-cinnamon.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w10-edge.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w7-ie11.log +2 -0
- data/test/integration/.kitchen/logs/default-modernIE-w81-ie11.log +2 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-x86-64.log +2 -0
- data/test/integration/.kitchen/logs/default-opentable-win-2008r2-standard-amd64-nocm.log +0 -0
- data/test/integration/.kitchen/logs/default-opentable-win-2012r2-standard-amd64-nocm.log +0 -0
- data/test/integration/.kitchen/logs/default-redhat-65.log +0 -0
- data/test/integration/.kitchen/logs/default-redhat-71.log +0 -0
- data/test/integration/.kitchen/logs/default-suse-11sp3.log +0 -0
- data/test/integration/.kitchen/logs/default-suse-12.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1004-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1004.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1404-i386.log +2 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1404.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1510.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2008-opentable.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2008.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2012.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2012R2-matt.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2012r2-opentable.log +2 -0
- data/test/integration/.kitchen/logs/default-windows-2012r2.log +41 -0
- data/test/integration/.kitchen/logs/kitchen.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-511-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-511.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-67-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-67.log +0 -0
- data/test/integration/.kitchen/logs/new-centos-71.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-6010-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-6010.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-78-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-78.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-81-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-debian-81.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-21-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-21.log +0 -0
- data/test/integration/.kitchen/logs/new-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/new-freebsd-102.log +0 -0
- data/test/integration/.kitchen/logs/new-freebsd-93.log +0 -0
- data/test/integration/.kitchen/logs/new-opensuse-132-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-opensuse-132-x86-64.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1004-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1004.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1204-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1404-i386.log +0 -0
- data/test/integration/.kitchen/logs/new-ubuntu-1404.log +3 -0
- data/test/integration/.kitchen/logs/test-centos-511-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-511.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-67-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-67.log +0 -0
- data/test/integration/.kitchen/logs/test-centos-71.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-6010-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-6010.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-78-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-78.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-81-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-debian-81.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-21-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-21.log +0 -0
- data/test/integration/.kitchen/logs/test-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/test-freebsd-102.log +0 -0
- data/test/integration/.kitchen/logs/test-freebsd-93.log +0 -0
- data/test/integration/.kitchen/logs/test-opensuse-132-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-opensuse-132-x86-64.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1004-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1004.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1204-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1204.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1404-i386.log +0 -0
- data/test/integration/.kitchen/logs/test-ubuntu-1404.log +0 -0
- data/test/integration/.kitchen/new-ubuntu-1404.yml +1 -0
- data/test/integration/Berksfile +1 -0
- data/test/integration/Berksfile.lock +27 -0
- data/test/integration/TODO.md +15 -0
- data/test/integration/cookbooks/os_prepare/files/empty.iso +0 -0
- data/test/integration/cookbooks/os_prepare/metadata.rb +2 -0
- data/test/integration/cookbooks/os_prepare/recipes/_runit_service_centos.rb +34 -0
- data/test/integration/cookbooks/os_prepare/recipes/default.rb +1 -0
- data/test/integration/cookbooks/os_prepare/recipes/mount.rb +5 -5
- data/test/integration/cookbooks/os_prepare/recipes/postgres.rb +12 -0
- data/test/integration/cookbooks/os_prepare/recipes/service.rb +6 -2
- data/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb +3 -0
- data/test/integration/test/.DS_Store +0 -0
- data/test/integration/test/integration/.DS_Store +0 -0
- data/test/integration/test/integration/default/.DS_Store +0 -0
- data/test/integration/test/integration/default/certificate_spec.rb +7 -0
- data/test/integration/test/integration/default/file_spec.rb +2 -2
- data/test/integration/test/integration/default/mount_spec.rb +1 -1
- data/test/integration/test/integration/default/postgres_session_spec.rb +9 -0
- data/test/integration/test/integration/default/service_spec.rb +34 -0
- data/test/mac/service_spec.rb +5 -0
- data/test/serverspec/.kitchen.yml +18 -0
- data/test/serverspec/.kitchen/default-ubuntu-1404.yml +6 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/Vagrantfile +9 -0
- data/test/serverspec/.kitchen/logs/default-ubuntu-1404.log +2 -0
- data/test/serverspec/.kitchen/logs/kitchen.log +3 -0
- data/test/serverspec/Berksfile +3 -0
- data/test/serverspec/Berksfile.lock +5 -0
- data/test/serverspec/TODO.md +2 -0
- data/test/serverspec/test/integration/default/serverspec/os_spec.rb +25 -0
- data/test/serverspec/test/integration/default/serverspec/spec_helper.rb +48 -0
- data/test/serverspec/test/integration/default/serverspec/sysctl_spec.rb +37 -0
- data/test/unit/metadata_test.rb +13 -1
- data/test/unit/mock/profiles/complete-metadata/inspec.yml +7 -0
- data/test/unit/mock/profiles/empty-metadata/inspec.yml +0 -0
- data/test/unit/mock/profiles/{complete-meta → legacy-complete-metadata}/metadata.rb +0 -0
- data/test/unit/mock/profiles/legacy-complete-metadata/test/.gitkeep +0 -0
- data/test/unit/mock/profiles/legacy-empty-metadata/controls/.gitkeep +0 -0
- data/test/unit/mock/profiles/legacy-empty-metadata/metadata.rb +0 -0
- data/test/unit/mock/profiles/{metadata → legacy-simple-metadata}/metadata.rb +0 -0
- data/test/unit/mock/profiles/legacy-simple-metadata/test/.gitkeep +0 -0
- data/test/unit/mock/profiles/simple-metadata/inspec.yml +1 -0
- data/test/unit/profile_test.rb +82 -31
- data/test/unit/resources/service_test.rb +67 -3
- metadata +466 -23
- data/examples/resource/controls/tiny.rb +0 -3
- data/examples/resource/inspec.yml +0 -10
- data/examples/resource/libraries/tiny.rb +0 -3
- data/lib/inspec/targets/url.rb.orig +0 -87
- data/test/unit/mock/profiles/custom-resource/libraries/resource.rb +0 -3
- data/test/unit/mock/profiles/custom-resource/metadata.rb +0 -7
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
--- {}
|
data/test/integration/Berksfile
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
DEPENDENCIES
|
2
|
+
apt
|
3
|
+
os_prepare
|
4
|
+
path: cookbooks/os_prepare
|
5
|
+
runit
|
6
|
+
git: git://github.com/hw-cookbooks/runit.git
|
7
|
+
revision: 994febbc29e2bb0d9d1c54662f19b65da76505a3
|
8
|
+
|
9
|
+
GRAPH
|
10
|
+
apt (2.8.2)
|
11
|
+
build-essential (2.2.4)
|
12
|
+
chef-sugar (3.3.0)
|
13
|
+
openssl (4.4.0)
|
14
|
+
chef-sugar (>= 3.1.1)
|
15
|
+
os_prepare (1.0.0)
|
16
|
+
apt (>= 0.0.0)
|
17
|
+
postgresql (>= 0.0.0)
|
18
|
+
runit (>= 0.0.0)
|
19
|
+
yum (>= 0.0.0)
|
20
|
+
packagecloud (0.1.1)
|
21
|
+
postgresql (4.0.0)
|
22
|
+
apt (>= 1.9.0)
|
23
|
+
build-essential (>= 0.0.0)
|
24
|
+
openssl (~> 4.0)
|
25
|
+
runit (1.7.6)
|
26
|
+
packagecloud (>= 0.0.0)
|
27
|
+
yum (3.8.1)
|
Binary file
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# author: Stephan Renatus
|
3
|
+
|
4
|
+
include_recipe 'runit::default'
|
5
|
+
|
6
|
+
# put ctl in alt location
|
7
|
+
directory '/opt/chef/embedded/sbin' do
|
8
|
+
recursive true
|
9
|
+
action :create
|
10
|
+
end
|
11
|
+
|
12
|
+
link '/opt/chef/embedded/sbin/sv' do
|
13
|
+
to '/sbin/sv' # default location
|
14
|
+
end
|
15
|
+
|
16
|
+
runit_service 'running-runit-service' do
|
17
|
+
default_logger true
|
18
|
+
run_template_name 'default-svlog'
|
19
|
+
end
|
20
|
+
|
21
|
+
runit_service 'not-enabled-runit-service' do
|
22
|
+
default_logger true
|
23
|
+
run_template_name 'default-svlog'
|
24
|
+
start_down true
|
25
|
+
action :enable
|
26
|
+
end
|
27
|
+
|
28
|
+
runit_service 'not-running-runit-service' do
|
29
|
+
default_logger true
|
30
|
+
run_template_name 'default-svlog'
|
31
|
+
action :create
|
32
|
+
end
|
33
|
+
|
34
|
+
execute 'sv down not-running-runit-service'
|
@@ -4,9 +4,9 @@
|
|
4
4
|
#
|
5
5
|
# file mount tests
|
6
6
|
|
7
|
-
#
|
8
|
-
|
9
|
-
|
7
|
+
# copy iso file for mount tests
|
8
|
+
# NB created using `mkdir empty; mkisofs -o empty.iso empty/`
|
9
|
+
cookbook_file '/root/empty.iso' do
|
10
10
|
owner 'root'
|
11
11
|
group 'root'
|
12
12
|
mode '0755'
|
@@ -21,9 +21,9 @@ directory '/mnt/iso-disk' do
|
|
21
21
|
action :create
|
22
22
|
end
|
23
23
|
|
24
|
-
# mount -o loop /root/
|
24
|
+
# mount -o loop /root/empty.iso /mnt/iso-disk
|
25
25
|
mount '/mnt/iso-disk' do
|
26
|
-
device '/root/
|
26
|
+
device '/root/empty.iso'
|
27
27
|
options 'loop'
|
28
28
|
action [:mount, :enable]
|
29
29
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# author: Stephan Renatus
|
3
|
+
#
|
4
|
+
# installs everyting for the postgres tests
|
5
|
+
|
6
|
+
# hw-cookbooks/postgresql is tested on these platforms
|
7
|
+
case node['platform']
|
8
|
+
when 'ubuntu', 'centos'
|
9
|
+
node.default['postgresql']['config']['listen_addresses'] = 'localhost'
|
10
|
+
node.default['postgresql']['password']['postgres'] = 'md506be11be01439cb4abd537e454df34ea' # "inspec"
|
11
|
+
include_recipe 'postgresql::server'
|
12
|
+
end
|
@@ -4,9 +4,13 @@
|
|
4
4
|
#
|
5
5
|
# prepares services
|
6
6
|
|
7
|
-
# install ntp as a service on ubuntu
|
8
7
|
case node['platform']
|
9
8
|
when 'ubuntu'
|
10
|
-
|
9
|
+
# install ntp as a service
|
10
|
+
include_recipe 'apt::default'
|
11
11
|
package 'ntp'
|
12
|
+
|
13
|
+
when 'centos'
|
14
|
+
# install runit for alternative service mgmt
|
15
|
+
include_recipe 'os_prepare::_runit_service_centos'
|
12
16
|
end
|
Binary file
|
Binary file
|
Binary file
|
@@ -124,7 +124,7 @@ if os.unix?
|
|
124
124
|
it { should be_mounted }
|
125
125
|
it { should be_mounted.with( :type => 'iso9660' ) }
|
126
126
|
it { should be_mounted.with( :type => 'iso9660', :options => { :ro => true } ) }
|
127
|
-
it { should be_mounted.with( :type => 'iso9660', :device => '/root/
|
127
|
+
it { should be_mounted.with( :type => 'iso9660', :device => '/root/empty.iso' ) }
|
128
128
|
it { should_not be_mounted.with( :type => 'ext4' ) }
|
129
129
|
it { should_not be_mounted.with( :type => 'xfs' ) }
|
130
130
|
end
|
@@ -133,7 +133,7 @@ if os.unix?
|
|
133
133
|
# also see mount_spec.rb
|
134
134
|
describe file('/mnt/iso-disk') do
|
135
135
|
it { should be_mounted.only_with( {
|
136
|
-
:device=>"/root/
|
136
|
+
:device=>"/root/empty.iso",
|
137
137
|
:type=>"iso9660",
|
138
138
|
:options=>{
|
139
139
|
:ro=>true}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
describe mount '/mnt/iso-disk' do
|
5
5
|
it { should be_mounted }
|
6
6
|
its('count') { should eq 1 }
|
7
|
-
its('device') { should eq '/root/
|
7
|
+
its('device') { should eq '/root/empty.iso' }
|
8
8
|
its('type') { should eq 'iso9660' }
|
9
9
|
its('options') { should eq ['ro'] }
|
10
10
|
end
|
@@ -42,3 +42,37 @@ if os[:family] == 'ubuntu'
|
|
42
42
|
it { should be_running }
|
43
43
|
end
|
44
44
|
end
|
45
|
+
|
46
|
+
# extra tests for alt. runit on centos with runit_service
|
47
|
+
if os[:family] == 'centos'
|
48
|
+
describe runit_service('running-runit-service') do
|
49
|
+
it { should be_enabled }
|
50
|
+
it { should be_installed }
|
51
|
+
it { should be_running }
|
52
|
+
end
|
53
|
+
|
54
|
+
describe runit_service('not-running-runit-service') do
|
55
|
+
it { should be_enabled }
|
56
|
+
it { should be_installed }
|
57
|
+
it { should_not be_running }
|
58
|
+
end
|
59
|
+
|
60
|
+
describe runit_service('not-enabled-runit-service') do
|
61
|
+
it { should_not be_enabled }
|
62
|
+
it { should be_installed }
|
63
|
+
it { should_not be_running }
|
64
|
+
end
|
65
|
+
|
66
|
+
# alt. ctl location
|
67
|
+
describe runit_service('running-runit-service', '/opt/chef/embedded/sbin/sv') do
|
68
|
+
it { should be_enabled }
|
69
|
+
it { should be_installed }
|
70
|
+
it { should be_running }
|
71
|
+
end
|
72
|
+
|
73
|
+
describe runit_service('unknown') do
|
74
|
+
it { should_not be_enabled }
|
75
|
+
it { should_not be_installed }
|
76
|
+
it { should_not be_running }
|
77
|
+
end
|
78
|
+
end
|
@@ -0,0 +1,6 @@
|
|
1
|
+
---
|
2
|
+
hostname: 127.0.0.1
|
3
|
+
port: '2205'
|
4
|
+
username: vagrant
|
5
|
+
ssh_key: "/Users/chartmann/Development/vulcano/vulcano-cli/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key"
|
6
|
+
last_action: verify
|
@@ -0,0 +1 @@
|
|
1
|
+
1449613760
|
@@ -0,0 +1 @@
|
|
1
|
+
501
|
@@ -0,0 +1 @@
|
|
1
|
+
0f519e32-868a-4bbb-be75-3e784c785917
|
@@ -0,0 +1 @@
|
|
1
|
+
f66024948ae34585a7b1d6c7e08ba4a1
|
@@ -0,0 +1,27 @@
|
|
1
|
+
-----BEGIN RSA PRIVATE KEY-----
|
2
|
+
MIIEowIBAAKCAQEA1KWrGcypqQFzz4ZFYjHBqk/d4QV9c6JYO9xV7mNWmLknpivT
|
3
|
+
ry976zBqeV923vUvZ2vndMtI+Z7tg5YpsaJCdbNuc078AyjzG+ahVPWrcMLa+hyk
|
4
|
+
VuzLgqyrlWLRc5PcB4JSVVDIVzamarMz9Xo7MOv2KjQBeBSRPQCAWXlrC0zcop5g
|
5
|
+
QGgokclPYF780JGBVTFt00y1AS6ZKUbin+YB9RzuQetixe8QIQfKCrljMJeQ9Ppt
|
6
|
+
bW2Fiyukfg0YAc3SLZnNyrLWtqgLgCkk86jICKr0cZeqeIeZ8Qojo9ERDi5igItg
|
7
|
+
0HP+W2P47k42NUXTZZ8tZ54HmJ/pWsnclJN5WwIDAQABAoIBADzEOujce384Uwfy
|
8
|
+
rtEottcci6NKFld9BQnWJRhCevSZtKLf01Y0k4zaARM+HJIKLsm3JCVUEj6DFAyO
|
9
|
+
VMvWOne4FtAMuieNBCvs9B17Nsq6ZCklFjFg6acmAMJnwsLsdewPacfHlfiWPWgw
|
10
|
+
XaDAlTmdtHLK+cB+4CI2incHI3fOsbfus/EhT9rNrUhw3Zn5/dq0TaEO5amp8QEN
|
11
|
+
/Tblo2LpqEjudqvPO3Yud5WZb1ByFjE1FvPglgrPAsXztInKSHYaURjQ8K6CFNhg
|
12
|
+
ITmqBF5Da9Ha8u9pCTPP6a4/FQkK0JcOuiTgy3EIWTa+Ioqz3VWhX4/qXWgQdyAH
|
13
|
+
74jWh4ECgYEA78k8s3ZtCKoVCgZWDVn6Y1cLiAJkl0bMS4sUMwDCHYaghDa5mXiz
|
14
|
+
CbkIw/3MGPooXMQhwewJxex0LXEFJhHDyvjIP1G2CE0qEOiScOhSTKeEney/50Xe
|
15
|
+
ZC/neay57IlQUNBRfJVokjMTUX40+xahpuS24FKWuv5IbtZcbgek8VkCgYEA4wam
|
16
|
+
FAW574ORmqyfi0FXCZarMmaNQnay3IEDk+NWtg67P+gbz7j6UAmYsqqaVOdaAfOs
|
17
|
+
DQlu/F/8uESaqlgpRdyH+LkKrIUDBJ6E90XoY21KgYhb6Dyq14iVaVyPt2GMP8+C
|
18
|
+
0JtYn2uEPShC4KvzIKw6ywqdCvTqrnRBeiGuVdMCgYBhSnZtnoxo6pG0ypNZwXtd
|
19
|
+
mTDdk5L66kf0Es80Tod0cW5plsbBpX6HYGNVGoIYVE/SK+ZCh6IDg4gz89qR8r1N
|
20
|
+
epnNTzsbrSt3RtY8J5dU8NdXOHs4vFmarvEtpk6d0a0bzRpzATA3ua+J7jpS8oDO
|
21
|
+
dZhZ9kigQJJlHmbMYh+jqQKBgAGEa9u6ZhG5uWFlQfO2ThScUyyVDuCg1nUuz41P
|
22
|
+
eabh1lKJBJaQz+t1BPY8uadTnIBi1oWHyJwbMB8zJi15RV1YKfh5lB6vDOQdAxp7
|
23
|
+
9x+i/Vp8RND6htHF8emwWq2JE1zh0CgAwcje+RVHjZrey1Muk34D5iTKmj7sO/vK
|
24
|
+
+dVNAoGBAIphTIYzt1D73qtagNdp5v4qAs87HviY6Us5PC3Hfewm1zqBofeY/DAw
|
25
|
+
l/6zjmUNPnTvvV6eiFDPvSgoXeKlO7fCY0Jbpr88Izm/jfClSSdRXPHD59ZS8w6Q
|
26
|
+
0xKjdXvfwmxo8xHKheB1tuiHSTPNlq/eSEFEDw7U51L8pcm2Mx7w
|
27
|
+
-----END RSA PRIVATE KEY-----
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/Vagrantfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
Vagrant.configure("2") do |c|
|
2
|
+
c.berkshelf.enabled = false if Vagrant.has_plugin?("vagrant-berkshelf")
|
3
|
+
c.vm.box = "opscode-ubuntu-14.04"
|
4
|
+
c.vm.box_url = "https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-14.04_chef-provisionerless.box"
|
5
|
+
c.vm.hostname = "default-ubuntu-1404"
|
6
|
+
c.vm.synced_folder ".", "/vagrant", disabled: true
|
7
|
+
c.vm.provider :virtualbox do |p|
|
8
|
+
end
|
9
|
+
end
|
@@ -0,0 +1,3 @@
|
|
1
|
+
I, [2015-12-08T23:48:00.475985 #25801] INFO -- Kitchen: -----> Starting Kitchen (v1.4.2)
|
2
|
+
I, [2015-12-08T23:48:01.367571 #25801] INFO -- Kitchen: -----> Verifying <default-ubuntu-1404>...
|
3
|
+
I, [2015-12-08T23:48:01.990267 #25801] INFO -- Kitchen: -----> Kitchen is finished. (0m1.51s)
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe command('find / -name \'.rhosts\' | wc -l ') do
|
6
|
+
its(:stdout) { should match(/^0/) }
|
7
|
+
end
|
8
|
+
|
9
|
+
describe command('find / -name \'hosts.equiv\' | wc -l ') do
|
10
|
+
its(:stdout) { should match(/^0/) }
|
11
|
+
end
|
12
|
+
|
13
|
+
describe file('/etc/shadow') do
|
14
|
+
it { should exist }
|
15
|
+
it { should be_file }
|
16
|
+
it { should be_owned_by 'root' }
|
17
|
+
end
|
18
|
+
|
19
|
+
describe command('echo $PATH | grep -ci \'\.\'') do
|
20
|
+
its(:stdout) { should match(/^0/) }
|
21
|
+
end
|
22
|
+
|
23
|
+
describe file('/etc/login.defs') do
|
24
|
+
its(:content) { should match(/^SU_NAME\s*su/) }
|
25
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
if ENV['STANDALONE_SPEC']
|
4
|
+
|
5
|
+
# require 'serverspec'
|
6
|
+
require 'pathname'
|
7
|
+
require 'net/ssh'
|
8
|
+
require 'highline/import'
|
9
|
+
|
10
|
+
set :backend, :ssh
|
11
|
+
|
12
|
+
RSpec.configure do |c|
|
13
|
+
|
14
|
+
if ENV['ASK_SUDO_PASSWORD']
|
15
|
+
c.sudo_password = ask('Enter sudo password: ') { |q| q.echo = false }
|
16
|
+
else
|
17
|
+
c.sudo_password = ENV['SUDO_PASSWORD']
|
18
|
+
end
|
19
|
+
|
20
|
+
options = {}
|
21
|
+
|
22
|
+
if ENV['ASK_LOGIN_PASSWORD']
|
23
|
+
options[:password] = ask("\nEnter login password: ") { |q| q.echo = false }
|
24
|
+
else
|
25
|
+
options[:password] = ENV['LOGIN_PASSWORD']
|
26
|
+
end
|
27
|
+
|
28
|
+
if ENV['ASK_LOGIN_USERNAME']
|
29
|
+
options[:user] = ask("\nEnter login username: ") { |q| q.echo = false }
|
30
|
+
else
|
31
|
+
options[:user] = ENV['LOGIN_USERNAME'] || ENV['user'] || Etc.getlogin
|
32
|
+
end
|
33
|
+
|
34
|
+
if options[:user].nil?
|
35
|
+
puts 'specify login user env LOGIN_USERNAME= or user='
|
36
|
+
exit 1
|
37
|
+
end
|
38
|
+
|
39
|
+
c.host = ENV['TARGET_HOST']
|
40
|
+
c.ssh_options = options.merge(Net::SSH::Config.for(c.host))
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
else
|
45
|
+
# require 'serverspec'
|
46
|
+
#
|
47
|
+
set :backend, :exec
|
48
|
+
end
|