inspec 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +40 -2
- data/Gemfile +1 -0
- data/README.md +21 -2
- data/Rakefile +1 -1
- data/bin/inspec +25 -3
- data/bin/os +23 -0
- data/docs/dsl_resource.rst +90 -0
- data/docs/profiles.rst +167 -0
- data/docs/resources.rst +79 -0
- data/examples/README.md +1 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-centos-71.log +0 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1204.log +0 -0
- data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1404.log +432 -0
- data/examples/kitchen-ansible/.kitchen/logs/kitchen.log +10 -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 +0 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1204.log +0 -0
- data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1404.log +306 -0
- data/examples/kitchen-puppet/.kitchen/logs/kitchen.log +10 -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/README.md +30 -0
- data/examples/profile/controls/example.rb +14 -0
- data/examples/profile/controls/gordon.rb +20 -0
- data/examples/profile/inspec.yml +10 -0
- data/examples/profile/libraries/.DS_Store +0 -0
- data/examples/profile/libraries/gordon_config.rb +17 -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 +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/inspec/archive/tar.rb +29 -0
- data/lib/inspec/archive/zip.rb +19 -0
- data/lib/inspec/metadata.rb +110 -15
- data/lib/inspec/profile.rb +88 -19
- data/lib/inspec/profile_context.rb +10 -4
- data/lib/inspec/resource.rb +1 -0
- data/lib/inspec/runner.rb +21 -4
- data/lib/inspec/targets.rb +2 -1
- data/lib/inspec/targets/archive.rb +39 -0
- data/lib/inspec/targets/core.rb +2 -2
- data/lib/inspec/targets/dir.rb +18 -2
- data/lib/inspec/targets/file.rb +4 -0
- data/lib/inspec/targets/folder.rb +21 -11
- data/lib/inspec/targets/tar.rb +36 -5
- data/lib/inspec/targets/url.rb +45 -13
- data/lib/inspec/targets/zip.rb +22 -15
- data/lib/inspec/version.rb +1 -1
- data/lib/matchers/matchers.rb +30 -0
- data/lib/resources/certificate.rb +0 -0
- data/lib/resources/etc_group.rb +1 -1
- data/lib/resources/file.rb +28 -3
- data/lib/resources/mount.rb +57 -0
- data/lib/resources/passwd.rb +1 -1
- data/lib/resources/private_key.rb +0 -0
- data/lib/resources/user.rb +3 -2
- data/lib/utils/hash.rb +29 -1
- data/lib/utils/parser.rb +34 -1
- data/lib/utils/simpleconfig.rb +1 -1
- 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/helper.rb +3 -1
- data/test/integration/.DS_Store +0 -0
- data/test/integration/.kitchen.ec2.yml +67 -0
- data/test/integration/.kitchen.local.yml +68 -0
- data/test/integration/.kitchen/default-aws-linux.yml +4 -0
- data/test/integration/.kitchen/default-centos-511.yml +6 -0
- data/test/integration/.kitchen/default-centos-67.yml +6 -0
- data/test/integration/.kitchen/default-centos-7.yml +4 -0
- data/test/integration/.kitchen/default-centos-71.yml +6 -0
- data/test/integration/.kitchen/default-debian-6010.yml +6 -0
- data/test/integration/.kitchen/default-debian-78.yml +6 -0
- data/test/integration/.kitchen/default-debian-8.yml +4 -0
- data/test/integration/.kitchen/default-debian-81.yml +6 -0
- data/test/integration/.kitchen/default-fedora-21.yml +6 -0
- data/test/integration/.kitchen/default-fedora-22.yml +4 -0
- data/test/integration/.kitchen/default-freebsd-102.yml +6 -0
- data/test/integration/.kitchen/default-freebsd-93.yml +6 -0
- data/test/integration/.kitchen/default-opensuse-132-x86-64.yml +6 -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-1004.yml +6 -0
- data/test/integration/.kitchen/default-ubuntu-1204.yml +4 -0
- data/test/integration/.kitchen/default-ubuntu-1404.yml +4 -0
- data/test/integration/.kitchen/default-ubuntu-1510.yml +4 -0
- data/test/integration/.kitchen/default-windows-2012.yml +5 -0
- data/test/integration/.kitchen/default-windows-2012r2.yml +6 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/Vagrantfile +9 -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-centos-67/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/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-freebsd-102/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/Vagrantfile +9 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/action_set_name +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/creator_uid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/id +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/index_uuid +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/private_key +27 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/synced_folders +1 -0
- data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/Vagrantfile +9 -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-new-ubuntu-1404/Vagrantfile +9 -0
- data/test/integration/.kitchen/logs/default-aws-linux.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-511-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-511.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-67-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-67.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-7.log +0 -0
- data/test/integration/.kitchen/logs/default-centos-71.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-6010-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-6010.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-78-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-78.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-8.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-81-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-debian-81.log +0 -0
- data/test/integration/.kitchen/logs/default-fedora-21-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-fedora-21.log +0 -0
- data/test/integration/.kitchen/logs/default-fedora-22.log +0 -0
- data/test/integration/.kitchen/logs/default-freebsd-102.log +0 -0
- data/test/integration/.kitchen/logs/default-freebsd-93.log +0 -0
- data/test/integration/.kitchen/logs/default-mint-172-cinnamon.log +0 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-opensuse-132-x86-64.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 +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1004.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204-i386.log +0 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1204.log +23 -0
- data/test/integration/.kitchen/logs/default-ubuntu-1404-i386.log +0 -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-2012.log +0 -0
- data/test/integration/.kitchen/logs/default-windows-2012r2.log +0 -0
- data/test/integration/.kitchen/logs/kitchen.log +3 -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.lock +11 -0
- data/test/integration/TODO.md +15 -0
- data/test/integration/cookbooks/os_prepare/recipes/default.rb +1 -0
- data/test/integration/cookbooks/os_prepare/recipes/json_yaml_csv_ini.rb +13 -6
- data/test/integration/cookbooks/os_prepare/recipes/mount.rb +29 -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/csv_spec.rb +7 -1
- data/test/integration/test/integration/default/file_spec.rb +29 -0
- data/test/integration/test/integration/default/ini_spec.rb +7 -1
- data/test/integration/test/integration/default/json_spec.rb +7 -1
- data/test/integration/test/integration/default/mount_spec.rb +10 -0
- data/test/integration/test/integration/default/yaml_spec.rb +7 -1
- 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 +69 -0
- data/test/unit/mock/cmd/mount +1 -0
- data/test/unit/mock/cmd/mount-multiple +2 -0
- data/test/unit/mock/profiles/complete-meta/metadata.rb +7 -0
- data/test/unit/mock/profiles/complete-meta/test/.gitkeep +0 -0
- data/test/unit/mock/profiles/complete-profile/controls/filesystem_spec.rb +16 -0
- data/test/unit/mock/profiles/complete-profile/inspec.yml +10 -0
- data/test/unit/profile_context_test.rb +2 -2
- data/test/unit/profile_test.rb +63 -6
- data/test/unit/resources/file_test.rb +4 -0
- data/test/unit/resources/mount_test.rb +26 -0
- data/test/unit/utils/{content_parser_test.rb → passwd_parser_test.rb} +2 -2
- metadata +588 -5
@@ -0,0 +1,10 @@
|
|
1
|
+
I, [2015-12-11T12:15:20.176495 #3472] INFO -- Kitchen: -----> Starting Kitchen (v1.4.2)
|
2
|
+
I, [2015-12-11T12:15:20.731464 #3472] INFO -- Kitchen: -----> Cleaning up any prior instances of <default-ubuntu-1404>
|
3
|
+
I, [2015-12-11T12:15:20.731601 #3472] INFO -- Kitchen: -----> Destroying <default-ubuntu-1404>...
|
4
|
+
I, [2015-12-11T12:15:20.733905 #3472] INFO -- Kitchen: -----> Testing <default-ubuntu-1404>
|
5
|
+
I, [2015-12-11T12:15:20.733978 #3472] INFO -- Kitchen: -----> Creating <default-ubuntu-1404>...
|
6
|
+
I, [2015-12-11T12:15:54.354485 #3472] INFO -- Kitchen: -----> Converging <default-ubuntu-1404>...
|
7
|
+
I, [2015-12-11T12:16:43.310833 #3472] INFO -- Kitchen: -----> Setting up <default-ubuntu-1404>...
|
8
|
+
I, [2015-12-11T12:16:43.313589 #3472] INFO -- Kitchen: -----> Verifying <default-ubuntu-1404>...
|
9
|
+
I, [2015-12-11T12:16:43.543197 #3472] INFO -- Kitchen: -----> Destroying <default-ubuntu-1404>...
|
10
|
+
I, [2015-12-11T12:16:47.514510 #3472] INFO -- Kitchen: -----> Kitchen is finished. (1m27.34s)
|
@@ -0,0 +1,174 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../.
|
3
|
+
specs:
|
4
|
+
inspec (0.9.5)
|
5
|
+
json (~> 1.8)
|
6
|
+
method_source (~> 0.8)
|
7
|
+
pry (~> 0)
|
8
|
+
r-train (~> 0.9)
|
9
|
+
rainbow (~> 2)
|
10
|
+
rspec (~> 3.3)
|
11
|
+
rspec-its (~> 1.2)
|
12
|
+
rubyzip (~> 1.1)
|
13
|
+
thor (~> 0.19)
|
14
|
+
|
15
|
+
GEM
|
16
|
+
remote: https://rubygems.org/
|
17
|
+
specs:
|
18
|
+
activemodel (4.2.5)
|
19
|
+
activesupport (= 4.2.5)
|
20
|
+
builder (~> 3.1)
|
21
|
+
activesupport (4.2.5)
|
22
|
+
i18n (~> 0.7)
|
23
|
+
json (~> 1.7, >= 1.7.7)
|
24
|
+
minitest (~> 5.1)
|
25
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
26
|
+
tzinfo (~> 1.1)
|
27
|
+
ast (2.1.0)
|
28
|
+
astrolabe (1.3.1)
|
29
|
+
parser (~> 2.2)
|
30
|
+
builder (3.2.2)
|
31
|
+
coderay (1.1.0)
|
32
|
+
concurrent-ruby (0.9.2)
|
33
|
+
diff-lcs (1.2.5)
|
34
|
+
docile (1.1.5)
|
35
|
+
docker-api (1.23.0)
|
36
|
+
excon (>= 0.38.0)
|
37
|
+
json
|
38
|
+
excon (0.45.4)
|
39
|
+
faraday (0.9.2)
|
40
|
+
multipart-post (>= 1.2, < 3)
|
41
|
+
ffi (1.9.10)
|
42
|
+
gssapi (1.2.0)
|
43
|
+
ffi (>= 1.0.1)
|
44
|
+
gyoku (1.3.1)
|
45
|
+
builder (>= 2.1.2)
|
46
|
+
her (0.6.8)
|
47
|
+
activemodel (>= 3.0.0)
|
48
|
+
activesupport (>= 3.0.0)
|
49
|
+
faraday (~> 0.8)
|
50
|
+
multi_json (~> 1.7)
|
51
|
+
httpclient (2.7.0.1)
|
52
|
+
i18n (0.7.0)
|
53
|
+
json (1.8.3)
|
54
|
+
kitchen-inspec (0.9.0)
|
55
|
+
inspec (~> 0.9)
|
56
|
+
test-kitchen (~> 1.4)
|
57
|
+
kitchen-puppet (1.0.35)
|
58
|
+
test-kitchen (~> 1.4)
|
59
|
+
kitchen-vagrant (0.19.0)
|
60
|
+
test-kitchen (~> 1.4)
|
61
|
+
librarian-puppet (2.2.1)
|
62
|
+
librarianp (>= 0.6.3)
|
63
|
+
puppet_forge (~> 1.0)
|
64
|
+
rsync
|
65
|
+
librarianp (0.6.3)
|
66
|
+
thor (~> 0.15)
|
67
|
+
little-plugger (1.1.4)
|
68
|
+
logging (2.0.0)
|
69
|
+
little-plugger (~> 1.1)
|
70
|
+
multi_json (~> 1.10)
|
71
|
+
method_source (0.8.2)
|
72
|
+
minitest (5.8.3)
|
73
|
+
mixlib-shellout (2.2.3)
|
74
|
+
multi_json (1.11.2)
|
75
|
+
multipart-post (2.0.0)
|
76
|
+
net-scp (1.2.1)
|
77
|
+
net-ssh (>= 2.6.5)
|
78
|
+
net-ssh (2.9.2)
|
79
|
+
nori (2.6.0)
|
80
|
+
parser (2.2.3.0)
|
81
|
+
ast (>= 1.1, < 3.0)
|
82
|
+
powerpack (0.1.1)
|
83
|
+
pry (0.10.3)
|
84
|
+
coderay (~> 1.1.0)
|
85
|
+
method_source (~> 0.8.1)
|
86
|
+
slop (~> 3.4)
|
87
|
+
puppet_forge (1.0.5)
|
88
|
+
her (~> 0.6.8)
|
89
|
+
r-train (0.9.1)
|
90
|
+
docker-api (~> 1.22)
|
91
|
+
json (~> 1.8)
|
92
|
+
mixlib-shellout (~> 2.1)
|
93
|
+
net-scp (~> 1.2)
|
94
|
+
net-ssh (~> 2.9)
|
95
|
+
winrm (~> 1.3)
|
96
|
+
winrm-transport (~> 1.0)
|
97
|
+
rainbow (2.0.0)
|
98
|
+
rake (10.4.2)
|
99
|
+
rspec (3.4.0)
|
100
|
+
rspec-core (~> 3.4.0)
|
101
|
+
rspec-expectations (~> 3.4.0)
|
102
|
+
rspec-mocks (~> 3.4.0)
|
103
|
+
rspec-core (3.4.1)
|
104
|
+
rspec-support (~> 3.4.0)
|
105
|
+
rspec-expectations (3.4.0)
|
106
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
107
|
+
rspec-support (~> 3.4.0)
|
108
|
+
rspec-its (1.2.0)
|
109
|
+
rspec-core (>= 3.0.0)
|
110
|
+
rspec-expectations (>= 3.0.0)
|
111
|
+
rspec-mocks (3.4.0)
|
112
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
113
|
+
rspec-support (~> 3.4.0)
|
114
|
+
rspec-support (3.4.1)
|
115
|
+
rsync (1.0.9)
|
116
|
+
rubocop (0.33.0)
|
117
|
+
astrolabe (~> 1.3)
|
118
|
+
parser (>= 2.2.2.5, < 3.0)
|
119
|
+
powerpack (~> 0.1)
|
120
|
+
rainbow (>= 1.99.1, < 3.0)
|
121
|
+
ruby-progressbar (~> 1.4)
|
122
|
+
ruby-progressbar (1.7.5)
|
123
|
+
rubyntlm (0.4.0)
|
124
|
+
rubyzip (1.1.7)
|
125
|
+
safe_yaml (1.0.4)
|
126
|
+
simplecov (0.11.0)
|
127
|
+
docile (~> 1.1.0)
|
128
|
+
json (~> 1.8)
|
129
|
+
simplecov-html (~> 0.10.0)
|
130
|
+
simplecov-html (0.10.0)
|
131
|
+
slop (3.6.0)
|
132
|
+
test-kitchen (1.4.2)
|
133
|
+
mixlib-shellout (>= 1.2, < 3.0)
|
134
|
+
net-scp (~> 1.1)
|
135
|
+
net-ssh (~> 2.7, < 2.10)
|
136
|
+
safe_yaml (~> 1.0)
|
137
|
+
thor (~> 0.18)
|
138
|
+
thor (0.19.1)
|
139
|
+
thread_safe (0.3.5)
|
140
|
+
tzinfo (1.2.2)
|
141
|
+
thread_safe (~> 0.1)
|
142
|
+
uuidtools (2.1.5)
|
143
|
+
winrm (1.3.5)
|
144
|
+
builder (>= 2.1.2)
|
145
|
+
gssapi (~> 1.2)
|
146
|
+
gyoku (~> 1.0)
|
147
|
+
httpclient (~> 2.2, >= 2.2.0.2)
|
148
|
+
logging (>= 1.6.1, < 3.0)
|
149
|
+
nori (~> 2.0)
|
150
|
+
rubyntlm (~> 0.4.0)
|
151
|
+
uuidtools (~> 2.1.2)
|
152
|
+
winrm-transport (1.0.3)
|
153
|
+
rubyzip (~> 1.1, >= 1.1.7)
|
154
|
+
winrm (~> 1.3)
|
155
|
+
|
156
|
+
PLATFORMS
|
157
|
+
ruby
|
158
|
+
|
159
|
+
DEPENDENCIES
|
160
|
+
bundler (~> 1.5)
|
161
|
+
concurrent-ruby (~> 0.9)
|
162
|
+
inspec!
|
163
|
+
kitchen-inspec
|
164
|
+
kitchen-puppet
|
165
|
+
kitchen-vagrant
|
166
|
+
librarian-puppet
|
167
|
+
minitest (~> 5.5)
|
168
|
+
rake (~> 10)
|
169
|
+
rubocop (~> 0.33.0)
|
170
|
+
simplecov (~> 0.10)
|
171
|
+
test-kitchen (~> 1.4)
|
172
|
+
|
173
|
+
BUNDLED WITH
|
174
|
+
1.10.6
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Example InSpec Profile
|
2
|
+
|
3
|
+
This example shows the implementation of a InSpec profile.
|
4
|
+
|
5
|
+
## Verify a profile
|
6
|
+
|
7
|
+
InSpec ships with built-in features to verify a profile structure.
|
8
|
+
|
9
|
+
```bash
|
10
|
+
$ inspec check examples/profile
|
11
|
+
I, [2015-11-21T12:44:50.851137 #20661] INFO -- : Checking profile in examples/profile
|
12
|
+
I, [2015-11-21T12:44:50.851216 #20661] INFO -- : Metadata OK.
|
13
|
+
D, [2015-11-21T12:44:50.851239 #20661] DEBUG -- : Found 2 rules.
|
14
|
+
D, [2015-11-21T12:44:50.851251 #20661] DEBUG -- : Verify all rules in examples/profile/controls/example_spec.rb
|
15
|
+
D, [2015-11-21T12:44:50.851263 #20661] DEBUG -- : Verify all rules in examples/profile/controls/gordon_spec.rb
|
16
|
+
I, [2015-11-21T12:44:50.851317 #20661] INFO -- : Rule definitions OK.
|
17
|
+
```
|
18
|
+
|
19
|
+
## Execute a profile
|
20
|
+
|
21
|
+
To run a profile on a local machine use `inspec exec /path/to/profile`.
|
22
|
+
|
23
|
+
```bash
|
24
|
+
$ inspec exec examples/profile
|
25
|
+
..
|
26
|
+
|
27
|
+
Finished in 0.0025 seconds (files took 0.12449 seconds to load)
|
28
|
+
2 examples, 0 failures
|
29
|
+
|
30
|
+
```
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# copyright: 2015, Chef Software, Inc.
|
3
|
+
# license: All rights reserved
|
4
|
+
|
5
|
+
title '/tmp profile'
|
6
|
+
|
7
|
+
control "tmp-1.0" do # A unique ID for this control
|
8
|
+
impact 0.0 # The criticality, if this control fails.
|
9
|
+
title "Create /tmp directory" # A human-readable title
|
10
|
+
desc "An optional description..."
|
11
|
+
describe file('/tmp') do # The actual test
|
12
|
+
it { should be_directory }
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
# copyright: 2015, Chef Software, Inc.
|
3
|
+
# license: All rights reserved
|
4
|
+
|
5
|
+
title 'Gordon Config Checks'
|
6
|
+
|
7
|
+
# To pass the test, create the following file
|
8
|
+
# ```bash
|
9
|
+
# cat <<EOF > /etc/gordon/config.yaml
|
10
|
+
# version: '1.0'
|
11
|
+
# EOF
|
12
|
+
# ```
|
13
|
+
control 'gordon-1.0' do
|
14
|
+
impact 0.7
|
15
|
+
title 'Create separate /tmp partition'
|
16
|
+
desc 'An optional description...'
|
17
|
+
describe gordon_config do
|
18
|
+
its('version') { should eq('1.0') }
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
name: profile
|
2
|
+
title: InSpec Example Profile
|
3
|
+
maintainer: Chef Software, Inc.
|
4
|
+
copyright: Chef Software, Inc.
|
5
|
+
copyright_email: support@chef.io
|
6
|
+
license: Apache 2 license
|
7
|
+
summary: Demonstrates the use of InSpec Compliance Profile
|
8
|
+
version: 1.0.0
|
9
|
+
supports:
|
10
|
+
- os-family: linux
|
Binary file
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'yaml'
|
2
|
+
|
3
|
+
class GordonConfig < Inspec.resource(1)
|
4
|
+
name 'gordon_config'
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
@path = '/etc/gordon/config.yaml'
|
8
|
+
@file = inspec.file(@path)
|
9
|
+
return skip_resource "Can't find file \"#{@path}\"" if !@file.file?
|
10
|
+
|
11
|
+
@params = YAML.load(@file.content)
|
12
|
+
end
|
13
|
+
|
14
|
+
def method_missing(name)
|
15
|
+
@params[name.to_s]
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
I, [2015-10-26T19:24:57.953775 #40618] INFO -- default-centos-71: -----> Destroying <default-centos-71>...
|
2
|
+
I, [2015-10-26T19:25:00.620438 #40618] INFO -- default-centos-71: ==> default: Forcing shutdown of VM...
|
3
|
+
I, [2015-10-26T19:25:01.718193 #40618] INFO -- default-centos-71: ==> default: Destroying VM and associated drives...
|
4
|
+
I, [2015-10-26T19:25:02.021621 #40618] INFO -- default-centos-71: Vagrant instance <default-centos-71> destroyed.
|
5
|
+
I, [2015-10-26T19:25:02.023117 #40618] INFO -- default-centos-71: Finished destroying <default-centos-71> (0m4.07s).
|
@@ -0,0 +1,5 @@
|
|
1
|
+
I, [2015-10-26T19:25:02.024159 #40618] INFO -- default-ubuntu-1204: -----> Destroying <default-ubuntu-1204>...
|
2
|
+
I, [2015-10-26T19:25:04.288033 #40618] INFO -- default-ubuntu-1204: ==> default: Forcing shutdown of VM...
|
3
|
+
I, [2015-10-26T19:25:05.389407 #40618] INFO -- default-ubuntu-1204: ==> default: Destroying VM and associated drives...
|
4
|
+
I, [2015-10-26T19:25:05.678911 #40618] INFO -- default-ubuntu-1204: Vagrant instance <default-ubuntu-1204> destroyed.
|
5
|
+
I, [2015-10-26T19:25:05.680344 #40618] INFO -- default-ubuntu-1204: Finished destroying <default-ubuntu-1204> (0m3.65s).
|
@@ -0,0 +1,5 @@
|
|
1
|
+
I, [2015-10-26T19:25:05.683069 #40618] INFO -- default-ubuntu-1404: -----> Destroying <default-ubuntu-1404>...
|
2
|
+
I, [2015-10-26T19:25:08.004732 #40618] INFO -- default-ubuntu-1404: ==> default: Forcing shutdown of VM...
|
3
|
+
I, [2015-10-26T19:25:09.197311 #40618] INFO -- default-ubuntu-1404: ==> default: Destroying VM and associated drives...
|
4
|
+
I, [2015-10-26T19:25:09.469828 #40618] INFO -- default-ubuntu-1404: Vagrant instance <default-ubuntu-1404> destroyed.
|
5
|
+
I, [2015-10-26T19:25:09.471501 #40618] INFO -- default-ubuntu-1404: Finished destroying <default-ubuntu-1404> (0m3.79s).
|
@@ -0,0 +1,5 @@
|
|
1
|
+
I, [2015-10-26T19:24:57.299598 #40618] INFO -- Kitchen: -----> Starting Kitchen (v1.4.2)
|
2
|
+
I, [2015-10-26T19:24:57.953675 #40618] INFO -- Kitchen: -----> Destroying <default-centos-71>...
|
3
|
+
I, [2015-10-26T19:25:02.024117 #40618] INFO -- Kitchen: -----> Destroying <default-ubuntu-1204>...
|
4
|
+
I, [2015-10-26T19:25:05.683011 #40618] INFO -- Kitchen: -----> Destroying <default-ubuntu-1404>...
|
5
|
+
I, [2015-10-26T19:25:09.473322 #40618] INFO -- Kitchen: -----> Kitchen is finished. (0m12.17s)
|
@@ -0,0 +1,233 @@
|
|
1
|
+
GIT
|
2
|
+
remote: git@github.com:chef/kitchen-inspec.git
|
3
|
+
revision: 82b5412fb875a5778b163a57d69b95b5fa968f6e
|
4
|
+
specs:
|
5
|
+
kitchen-inspec (0.1.0)
|
6
|
+
inspec
|
7
|
+
test-kitchen (~> 1.4)
|
8
|
+
|
9
|
+
GIT
|
10
|
+
remote: git@github.com:chef/train.git
|
11
|
+
revision: 0d7e661fcd1fef8e0c6feff42561ade599710120
|
12
|
+
specs:
|
13
|
+
train (0.0.0)
|
14
|
+
docker-api (~> 1.22)
|
15
|
+
json (~> 1.8)
|
16
|
+
mixlib-shellout (~> 2.1)
|
17
|
+
net-scp (~> 1.2)
|
18
|
+
net-ssh (~> 2.9)
|
19
|
+
winrm (~> 1.3)
|
20
|
+
winrm-transport (~> 1.0)
|
21
|
+
|
22
|
+
PATH
|
23
|
+
remote: ../../.
|
24
|
+
specs:
|
25
|
+
inspec (0.8.0)
|
26
|
+
json (~> 1.8)
|
27
|
+
method_source (~> 0.8)
|
28
|
+
pry (~> 0.10)
|
29
|
+
rainbow (~> 2)
|
30
|
+
rspec (~> 3.3)
|
31
|
+
rspec-its (~> 1.2)
|
32
|
+
rubyzip (~> 1.1)
|
33
|
+
thor (~> 0.19)
|
34
|
+
|
35
|
+
GEM
|
36
|
+
remote: https://rubygems.org/
|
37
|
+
specs:
|
38
|
+
addressable (2.3.8)
|
39
|
+
ast (2.1.0)
|
40
|
+
astrolabe (1.3.1)
|
41
|
+
parser (~> 2.2)
|
42
|
+
berkshelf (4.0.1)
|
43
|
+
addressable (~> 2.3.4)
|
44
|
+
berkshelf-api-client (~> 2.0)
|
45
|
+
buff-config (~> 1.0)
|
46
|
+
buff-extensions (~> 1.0)
|
47
|
+
buff-shell_out (~> 0.1)
|
48
|
+
celluloid (= 0.16.0)
|
49
|
+
celluloid-io (~> 0.16.1)
|
50
|
+
cleanroom (~> 1.0)
|
51
|
+
faraday (~> 0.9.0)
|
52
|
+
httpclient (~> 2.6.0)
|
53
|
+
minitar (~> 0.5.4)
|
54
|
+
octokit (~> 3.0)
|
55
|
+
retryable (~> 2.0)
|
56
|
+
ridley (~> 4.3)
|
57
|
+
solve (~> 1.1)
|
58
|
+
thor (~> 0.19)
|
59
|
+
berkshelf-api-client (2.0.0)
|
60
|
+
faraday (~> 0.9.1)
|
61
|
+
httpclient (~> 2.6.0)
|
62
|
+
buff-config (1.0.1)
|
63
|
+
buff-extensions (~> 1.0)
|
64
|
+
varia_model (~> 0.4)
|
65
|
+
buff-extensions (1.0.0)
|
66
|
+
buff-ignore (1.1.1)
|
67
|
+
buff-ruby_engine (0.1.0)
|
68
|
+
buff-shell_out (0.2.0)
|
69
|
+
buff-ruby_engine (~> 0.1.0)
|
70
|
+
builder (3.2.2)
|
71
|
+
celluloid (0.16.0)
|
72
|
+
timers (~> 4.0.0)
|
73
|
+
celluloid-io (0.16.2)
|
74
|
+
celluloid (>= 0.16.0)
|
75
|
+
nio4r (>= 1.1.0)
|
76
|
+
cleanroom (1.0.0)
|
77
|
+
coderay (1.1.0)
|
78
|
+
concurrent-ruby (0.9.1)
|
79
|
+
dep-selector-libgecode (1.0.2)
|
80
|
+
dep_selector (1.0.3)
|
81
|
+
dep-selector-libgecode (~> 1.0)
|
82
|
+
ffi (~> 1.9)
|
83
|
+
diff-lcs (1.2.5)
|
84
|
+
docile (1.1.5)
|
85
|
+
docker-api (1.22.4)
|
86
|
+
excon (>= 0.38.0)
|
87
|
+
json
|
88
|
+
erubis (2.7.0)
|
89
|
+
excon (0.45.4)
|
90
|
+
faraday (0.9.2)
|
91
|
+
multipart-post (>= 1.2, < 3)
|
92
|
+
ffi (1.9.10)
|
93
|
+
gssapi (1.2.0)
|
94
|
+
ffi (>= 1.0.1)
|
95
|
+
gyoku (1.3.1)
|
96
|
+
builder (>= 2.1.2)
|
97
|
+
hashie (3.4.3)
|
98
|
+
hitimes (1.2.3)
|
99
|
+
httpclient (2.6.0.1)
|
100
|
+
json (1.8.3)
|
101
|
+
kitchen-vagrant (0.19.0)
|
102
|
+
test-kitchen (~> 1.4)
|
103
|
+
little-plugger (1.1.4)
|
104
|
+
logging (1.8.2)
|
105
|
+
little-plugger (>= 1.1.3)
|
106
|
+
multi_json (>= 1.8.4)
|
107
|
+
method_source (0.8.2)
|
108
|
+
minitar (0.5.4)
|
109
|
+
minitest (5.8.1)
|
110
|
+
mixlib-authentication (1.3.0)
|
111
|
+
mixlib-log
|
112
|
+
mixlib-log (1.6.0)
|
113
|
+
mixlib-shellout (2.2.3)
|
114
|
+
multi_json (1.11.2)
|
115
|
+
multipart-post (2.0.0)
|
116
|
+
net-scp (1.2.1)
|
117
|
+
net-ssh (>= 2.6.5)
|
118
|
+
net-ssh (2.9.2)
|
119
|
+
nio4r (1.1.1)
|
120
|
+
nori (2.6.0)
|
121
|
+
octokit (3.8.0)
|
122
|
+
sawyer (~> 0.6.0, >= 0.5.3)
|
123
|
+
parser (2.2.3.0)
|
124
|
+
ast (>= 1.1, < 3.0)
|
125
|
+
powerpack (0.1.1)
|
126
|
+
pry (0.10.3)
|
127
|
+
coderay (~> 1.1.0)
|
128
|
+
method_source (~> 0.8.1)
|
129
|
+
slop (~> 3.4)
|
130
|
+
rainbow (2.0.0)
|
131
|
+
rake (10.4.2)
|
132
|
+
retryable (2.0.2)
|
133
|
+
ridley (4.3.2)
|
134
|
+
addressable
|
135
|
+
buff-config (~> 1.0)
|
136
|
+
buff-extensions (~> 1.0)
|
137
|
+
buff-ignore (~> 1.1)
|
138
|
+
buff-shell_out (~> 0.1)
|
139
|
+
celluloid (~> 0.16.0)
|
140
|
+
celluloid-io (~> 0.16.1)
|
141
|
+
erubis
|
142
|
+
faraday (~> 0.9.0)
|
143
|
+
hashie (>= 2.0.2, < 4.0.0)
|
144
|
+
httpclient (~> 2.6)
|
145
|
+
json (>= 1.7.7)
|
146
|
+
mixlib-authentication (>= 1.3.0)
|
147
|
+
retryable (~> 2.0)
|
148
|
+
semverse (~> 1.1)
|
149
|
+
varia_model (~> 0.4.0)
|
150
|
+
rspec (3.3.0)
|
151
|
+
rspec-core (~> 3.3.0)
|
152
|
+
rspec-expectations (~> 3.3.0)
|
153
|
+
rspec-mocks (~> 3.3.0)
|
154
|
+
rspec-core (3.3.2)
|
155
|
+
rspec-support (~> 3.3.0)
|
156
|
+
rspec-expectations (3.3.1)
|
157
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
158
|
+
rspec-support (~> 3.3.0)
|
159
|
+
rspec-its (1.2.0)
|
160
|
+
rspec-core (>= 3.0.0)
|
161
|
+
rspec-expectations (>= 3.0.0)
|
162
|
+
rspec-mocks (3.3.2)
|
163
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
164
|
+
rspec-support (~> 3.3.0)
|
165
|
+
rspec-support (3.3.0)
|
166
|
+
rubocop (0.33.0)
|
167
|
+
astrolabe (~> 1.3)
|
168
|
+
parser (>= 2.2.2.5, < 3.0)
|
169
|
+
powerpack (~> 0.1)
|
170
|
+
rainbow (>= 1.99.1, < 3.0)
|
171
|
+
ruby-progressbar (~> 1.4)
|
172
|
+
ruby-progressbar (1.7.5)
|
173
|
+
rubyntlm (0.4.0)
|
174
|
+
rubyzip (1.1.7)
|
175
|
+
safe_yaml (1.0.4)
|
176
|
+
sawyer (0.6.0)
|
177
|
+
addressable (~> 2.3.5)
|
178
|
+
faraday (~> 0.8, < 0.10)
|
179
|
+
semverse (1.2.1)
|
180
|
+
simplecov (0.10.0)
|
181
|
+
docile (~> 1.1.0)
|
182
|
+
json (~> 1.8)
|
183
|
+
simplecov-html (~> 0.10.0)
|
184
|
+
simplecov-html (0.10.0)
|
185
|
+
slop (3.6.0)
|
186
|
+
solve (1.2.1)
|
187
|
+
dep_selector (~> 1.0)
|
188
|
+
semverse (~> 1.1)
|
189
|
+
test-kitchen (1.4.2)
|
190
|
+
mixlib-shellout (>= 1.2, < 3.0)
|
191
|
+
net-scp (~> 1.1)
|
192
|
+
net-ssh (~> 2.7, < 2.10)
|
193
|
+
safe_yaml (~> 1.0)
|
194
|
+
thor (~> 0.18)
|
195
|
+
thor (0.19.1)
|
196
|
+
timers (4.0.4)
|
197
|
+
hitimes
|
198
|
+
uuidtools (2.1.5)
|
199
|
+
varia_model (0.4.1)
|
200
|
+
buff-extensions (~> 1.0)
|
201
|
+
hashie (>= 2.0.2, < 4.0.0)
|
202
|
+
winrm (1.3.4)
|
203
|
+
builder (>= 2.1.2)
|
204
|
+
gssapi (~> 1.2)
|
205
|
+
gyoku (~> 1.0)
|
206
|
+
httpclient (~> 2.2, >= 2.2.0.2)
|
207
|
+
logging (~> 1.6, >= 1.6.1)
|
208
|
+
nori (~> 2.0)
|
209
|
+
rubyntlm (~> 0.4.0)
|
210
|
+
uuidtools (~> 2.1.2)
|
211
|
+
winrm-transport (1.0.2)
|
212
|
+
rubyzip (~> 1.1, >= 1.1.7)
|
213
|
+
winrm (~> 1.3)
|
214
|
+
|
215
|
+
PLATFORMS
|
216
|
+
ruby
|
217
|
+
|
218
|
+
DEPENDENCIES
|
219
|
+
berkshelf (~> 4.0)
|
220
|
+
bundler (~> 1.5)
|
221
|
+
concurrent-ruby (~> 0.9)
|
222
|
+
inspec!
|
223
|
+
kitchen-inspec!
|
224
|
+
kitchen-vagrant
|
225
|
+
minitest (~> 5.5)
|
226
|
+
rake (~> 10)
|
227
|
+
rubocop (~> 0.33.0)
|
228
|
+
simplecov (~> 0.10)
|
229
|
+
test-kitchen (~> 1.4)
|
230
|
+
train!
|
231
|
+
|
232
|
+
BUNDLED WITH
|
233
|
+
1.10.5
|