inspec 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (365) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +40 -2
  3. data/Gemfile +1 -0
  4. data/README.md +21 -2
  5. data/Rakefile +1 -1
  6. data/bin/inspec +25 -3
  7. data/bin/os +23 -0
  8. data/docs/dsl_resource.rst +90 -0
  9. data/docs/profiles.rst +167 -0
  10. data/docs/resources.rst +79 -0
  11. data/examples/README.md +1 -0
  12. data/examples/kitchen-ansible/.kitchen/logs/default-centos-71.log +0 -0
  13. data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1204.log +0 -0
  14. data/examples/kitchen-ansible/.kitchen/logs/default-ubuntu-1404.log +432 -0
  15. data/examples/kitchen-ansible/.kitchen/logs/kitchen.log +10 -0
  16. data/examples/kitchen-ansible/Gemfile.lock +154 -0
  17. data/examples/kitchen-chef/.kitchen/default-centos-71.yml +6 -0
  18. data/examples/kitchen-chef/.kitchen/default-ubuntu-1204.yml +6 -0
  19. data/examples/kitchen-chef/.kitchen/default-ubuntu-1404.yml +6 -0
  20. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  21. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  22. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
  23. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  24. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
  25. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  26. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-centos-71/Vagrantfile +9 -0
  27. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  28. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  29. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
  30. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  31. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
  32. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  33. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1204/Vagrantfile +9 -0
  34. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  35. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  36. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
  37. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  38. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
  39. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  40. data/examples/kitchen-chef/.kitchen/kitchen-vagrant/kitchen-kitchen-chef-default-ubuntu-1404/Vagrantfile +9 -0
  41. data/examples/kitchen-chef/.kitchen/logs/default-centos-71.log +4 -0
  42. data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1204.log +4 -0
  43. data/examples/kitchen-chef/.kitchen/logs/default-ubuntu-1404.log +4 -0
  44. data/examples/kitchen-chef/.kitchen/logs/kitchen.log +8 -0
  45. data/examples/kitchen-chef/Berksfile.lock +11 -0
  46. data/examples/kitchen-chef/Gemfile.lock +223 -0
  47. data/examples/kitchen-puppet/.bundle/config +2 -0
  48. data/examples/kitchen-puppet/.kitchen/logs/default-centos-71.log +0 -0
  49. data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1204.log +0 -0
  50. data/examples/kitchen-puppet/.kitchen/logs/default-ubuntu-1404.log +306 -0
  51. data/examples/kitchen-puppet/.kitchen/logs/kitchen.log +10 -0
  52. data/examples/kitchen-puppet/.librarian/puppet/config +2 -0
  53. data/examples/kitchen-puppet/Gemfile.lock +174 -0
  54. data/examples/kitchen-puppet/Puppetfile.lock +2 -0
  55. data/examples/profile/README.md +30 -0
  56. data/examples/profile/controls/example.rb +14 -0
  57. data/examples/profile/controls/gordon.rb +20 -0
  58. data/examples/profile/inspec.yml +10 -0
  59. data/examples/profile/libraries/.DS_Store +0 -0
  60. data/examples/profile/libraries/gordon_config.rb +17 -0
  61. data/examples/test-kitchen/.kitchen/logs/default-centos-71.log +5 -0
  62. data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1204.log +5 -0
  63. data/examples/test-kitchen/.kitchen/logs/default-ubuntu-1404.log +5 -0
  64. data/examples/test-kitchen/.kitchen/logs/kitchen.log +5 -0
  65. data/examples/test-kitchen/Berksfile.lock +11 -0
  66. data/examples/test-kitchen/Gemfile.lock +233 -0
  67. data/inspec.gemspec +1 -1
  68. data/lib/.DS_Store +0 -0
  69. data/lib/inspec/archive/tar.rb +29 -0
  70. data/lib/inspec/archive/zip.rb +19 -0
  71. data/lib/inspec/metadata.rb +110 -15
  72. data/lib/inspec/profile.rb +88 -19
  73. data/lib/inspec/profile_context.rb +10 -4
  74. data/lib/inspec/resource.rb +1 -0
  75. data/lib/inspec/runner.rb +21 -4
  76. data/lib/inspec/targets.rb +2 -1
  77. data/lib/inspec/targets/archive.rb +39 -0
  78. data/lib/inspec/targets/core.rb +2 -2
  79. data/lib/inspec/targets/dir.rb +18 -2
  80. data/lib/inspec/targets/file.rb +4 -0
  81. data/lib/inspec/targets/folder.rb +21 -11
  82. data/lib/inspec/targets/tar.rb +36 -5
  83. data/lib/inspec/targets/url.rb +45 -13
  84. data/lib/inspec/targets/zip.rb +22 -15
  85. data/lib/inspec/version.rb +1 -1
  86. data/lib/matchers/matchers.rb +30 -0
  87. data/lib/resources/certificate.rb +0 -0
  88. data/lib/resources/etc_group.rb +1 -1
  89. data/lib/resources/file.rb +28 -3
  90. data/lib/resources/mount.rb +57 -0
  91. data/lib/resources/passwd.rb +1 -1
  92. data/lib/resources/private_key.rb +0 -0
  93. data/lib/resources/user.rb +3 -2
  94. data/lib/utils/hash.rb +29 -1
  95. data/lib/utils/parser.rb +34 -1
  96. data/lib/utils/simpleconfig.rb +1 -1
  97. data/test/chefdk/.gitignore +16 -0
  98. data/test/chefdk/.kitchen.yml +27 -0
  99. data/test/chefdk/Policyfile.rb +16 -0
  100. data/test/chefdk/README.md +4 -0
  101. data/test/chefdk/chefignore +100 -0
  102. data/test/chefdk/metadata.rb +7 -0
  103. data/test/chefdk/recipes/default.rb +5 -0
  104. data/test/chefdk/spec/spec_helper.rb +2 -0
  105. data/test/chefdk/spec/unit/recipes/default_spec.rb +20 -0
  106. data/test/chefdk/test/integration/default/serverspec/default_spec.rb +9 -0
  107. data/test/chefdk/test/integration/helpers/serverspec/spec_helper.rb +8 -0
  108. data/test/helper.rb +3 -1
  109. data/test/integration/.DS_Store +0 -0
  110. data/test/integration/.kitchen.ec2.yml +67 -0
  111. data/test/integration/.kitchen.local.yml +68 -0
  112. data/test/integration/.kitchen/default-aws-linux.yml +4 -0
  113. data/test/integration/.kitchen/default-centos-511.yml +6 -0
  114. data/test/integration/.kitchen/default-centos-67.yml +6 -0
  115. data/test/integration/.kitchen/default-centos-7.yml +4 -0
  116. data/test/integration/.kitchen/default-centos-71.yml +6 -0
  117. data/test/integration/.kitchen/default-debian-6010.yml +6 -0
  118. data/test/integration/.kitchen/default-debian-78.yml +6 -0
  119. data/test/integration/.kitchen/default-debian-8.yml +4 -0
  120. data/test/integration/.kitchen/default-debian-81.yml +6 -0
  121. data/test/integration/.kitchen/default-fedora-21.yml +6 -0
  122. data/test/integration/.kitchen/default-fedora-22.yml +4 -0
  123. data/test/integration/.kitchen/default-freebsd-102.yml +6 -0
  124. data/test/integration/.kitchen/default-freebsd-93.yml +6 -0
  125. data/test/integration/.kitchen/default-opensuse-132-x86-64.yml +6 -0
  126. data/test/integration/.kitchen/default-redhat-65.yml +4 -0
  127. data/test/integration/.kitchen/default-redhat-71.yml +4 -0
  128. data/test/integration/.kitchen/default-suse-11sp3.yml +4 -0
  129. data/test/integration/.kitchen/default-suse-12.yml +4 -0
  130. data/test/integration/.kitchen/default-ubuntu-1004.yml +6 -0
  131. data/test/integration/.kitchen/default-ubuntu-1204.yml +4 -0
  132. data/test/integration/.kitchen/default-ubuntu-1404.yml +4 -0
  133. data/test/integration/.kitchen/default-ubuntu-1510.yml +4 -0
  134. data/test/integration/.kitchen/default-windows-2012.yml +5 -0
  135. data/test/integration/.kitchen/default-windows-2012r2.yml +6 -0
  136. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  137. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  138. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/id +1 -0
  139. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  140. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/private_key +27 -0
  141. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  142. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-511/Vagrantfile +9 -0
  143. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67-i386/Vagrantfile +9 -0
  144. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  145. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  146. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/id +1 -0
  147. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  148. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/private_key +27 -0
  149. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  150. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-67/Vagrantfile +9 -0
  151. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  152. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  153. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/id +1 -0
  154. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  155. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/private_key +27 -0
  156. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  157. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-centos-71/Vagrantfile +9 -0
  158. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  159. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  160. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/id +1 -0
  161. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  162. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/private_key +27 -0
  163. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  164. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-6010/Vagrantfile +9 -0
  165. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  166. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  167. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/id +1 -0
  168. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  169. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/private_key +27 -0
  170. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  171. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-78/Vagrantfile +9 -0
  172. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  173. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  174. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/id +1 -0
  175. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  176. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/private_key +27 -0
  177. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  178. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/Vagrantfile +9 -0
  179. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  180. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  181. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/id +1 -0
  182. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  183. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/private_key +27 -0
  184. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  185. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-21/Vagrantfile +9 -0
  186. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  187. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  188. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/id +1 -0
  189. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  190. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/private_key +27 -0
  191. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  192. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/Vagrantfile +9 -0
  193. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  194. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  195. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/id +1 -0
  196. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  197. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/private_key +27 -0
  198. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  199. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-102/Vagrantfile +9 -0
  200. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  201. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  202. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/id +1 -0
  203. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  204. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/private_key +27 -0
  205. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  206. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-freebsd-93/Vagrantfile +9 -0
  207. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  208. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  209. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/id +1 -0
  210. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  211. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/private_key +27 -0
  212. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  213. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-opensuse-132-x86-64/Vagrantfile +9 -0
  214. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  215. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  216. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/id +1 -0
  217. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  218. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/private_key +27 -0
  219. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  220. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1004/Vagrantfile +9 -0
  221. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  222. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  223. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -0
  224. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  225. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +27 -0
  226. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  227. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/Vagrantfile +9 -0
  228. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  229. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  230. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
  231. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  232. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
  233. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  234. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/Vagrantfile +9 -0
  235. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-new-ubuntu-1404/Vagrantfile +9 -0
  236. data/test/integration/.kitchen/logs/default-aws-linux.log +0 -0
  237. data/test/integration/.kitchen/logs/default-centos-511-i386.log +0 -0
  238. data/test/integration/.kitchen/logs/default-centos-511.log +0 -0
  239. data/test/integration/.kitchen/logs/default-centos-67-i386.log +0 -0
  240. data/test/integration/.kitchen/logs/default-centos-67.log +0 -0
  241. data/test/integration/.kitchen/logs/default-centos-7.log +0 -0
  242. data/test/integration/.kitchen/logs/default-centos-71.log +0 -0
  243. data/test/integration/.kitchen/logs/default-debian-6010-i386.log +0 -0
  244. data/test/integration/.kitchen/logs/default-debian-6010.log +0 -0
  245. data/test/integration/.kitchen/logs/default-debian-78-i386.log +0 -0
  246. data/test/integration/.kitchen/logs/default-debian-78.log +0 -0
  247. data/test/integration/.kitchen/logs/default-debian-8.log +0 -0
  248. data/test/integration/.kitchen/logs/default-debian-81-i386.log +0 -0
  249. data/test/integration/.kitchen/logs/default-debian-81.log +0 -0
  250. data/test/integration/.kitchen/logs/default-fedora-21-i386.log +0 -0
  251. data/test/integration/.kitchen/logs/default-fedora-21.log +0 -0
  252. data/test/integration/.kitchen/logs/default-fedora-22.log +0 -0
  253. data/test/integration/.kitchen/logs/default-freebsd-102.log +0 -0
  254. data/test/integration/.kitchen/logs/default-freebsd-93.log +0 -0
  255. data/test/integration/.kitchen/logs/default-mint-172-cinnamon.log +0 -0
  256. data/test/integration/.kitchen/logs/default-opensuse-132-i386.log +0 -0
  257. data/test/integration/.kitchen/logs/default-opensuse-132-x86-64.log +0 -0
  258. data/test/integration/.kitchen/logs/default-redhat-65.log +0 -0
  259. data/test/integration/.kitchen/logs/default-redhat-71.log +0 -0
  260. data/test/integration/.kitchen/logs/default-suse-11sp3.log +0 -0
  261. data/test/integration/.kitchen/logs/default-suse-12.log +0 -0
  262. data/test/integration/.kitchen/logs/default-ubuntu-1004-i386.log +0 -0
  263. data/test/integration/.kitchen/logs/default-ubuntu-1004.log +0 -0
  264. data/test/integration/.kitchen/logs/default-ubuntu-1204-i386.log +0 -0
  265. data/test/integration/.kitchen/logs/default-ubuntu-1204.log +23 -0
  266. data/test/integration/.kitchen/logs/default-ubuntu-1404-i386.log +0 -0
  267. data/test/integration/.kitchen/logs/default-ubuntu-1404.log +0 -0
  268. data/test/integration/.kitchen/logs/default-ubuntu-1510.log +0 -0
  269. data/test/integration/.kitchen/logs/default-windows-2012.log +0 -0
  270. data/test/integration/.kitchen/logs/default-windows-2012r2.log +0 -0
  271. data/test/integration/.kitchen/logs/kitchen.log +3 -0
  272. data/test/integration/.kitchen/logs/new-centos-511-i386.log +0 -0
  273. data/test/integration/.kitchen/logs/new-centos-511.log +0 -0
  274. data/test/integration/.kitchen/logs/new-centos-67-i386.log +0 -0
  275. data/test/integration/.kitchen/logs/new-centos-67.log +0 -0
  276. data/test/integration/.kitchen/logs/new-centos-71.log +0 -0
  277. data/test/integration/.kitchen/logs/new-debian-6010-i386.log +0 -0
  278. data/test/integration/.kitchen/logs/new-debian-6010.log +0 -0
  279. data/test/integration/.kitchen/logs/new-debian-78-i386.log +0 -0
  280. data/test/integration/.kitchen/logs/new-debian-78.log +0 -0
  281. data/test/integration/.kitchen/logs/new-debian-81-i386.log +0 -0
  282. data/test/integration/.kitchen/logs/new-debian-81.log +0 -0
  283. data/test/integration/.kitchen/logs/new-fedora-21-i386.log +0 -0
  284. data/test/integration/.kitchen/logs/new-fedora-21.log +0 -0
  285. data/test/integration/.kitchen/logs/new-fedora-22.log +0 -0
  286. data/test/integration/.kitchen/logs/new-freebsd-102.log +0 -0
  287. data/test/integration/.kitchen/logs/new-freebsd-93.log +0 -0
  288. data/test/integration/.kitchen/logs/new-opensuse-132-i386.log +0 -0
  289. data/test/integration/.kitchen/logs/new-opensuse-132-x86-64.log +0 -0
  290. data/test/integration/.kitchen/logs/new-ubuntu-1004-i386.log +0 -0
  291. data/test/integration/.kitchen/logs/new-ubuntu-1004.log +0 -0
  292. data/test/integration/.kitchen/logs/new-ubuntu-1204-i386.log +0 -0
  293. data/test/integration/.kitchen/logs/new-ubuntu-1204.log +0 -0
  294. data/test/integration/.kitchen/logs/new-ubuntu-1404-i386.log +0 -0
  295. data/test/integration/.kitchen/logs/new-ubuntu-1404.log +3 -0
  296. data/test/integration/.kitchen/logs/test-centos-511-i386.log +0 -0
  297. data/test/integration/.kitchen/logs/test-centos-511.log +0 -0
  298. data/test/integration/.kitchen/logs/test-centos-67-i386.log +0 -0
  299. data/test/integration/.kitchen/logs/test-centos-67.log +0 -0
  300. data/test/integration/.kitchen/logs/test-centos-71.log +0 -0
  301. data/test/integration/.kitchen/logs/test-debian-6010-i386.log +0 -0
  302. data/test/integration/.kitchen/logs/test-debian-6010.log +0 -0
  303. data/test/integration/.kitchen/logs/test-debian-78-i386.log +0 -0
  304. data/test/integration/.kitchen/logs/test-debian-78.log +0 -0
  305. data/test/integration/.kitchen/logs/test-debian-81-i386.log +0 -0
  306. data/test/integration/.kitchen/logs/test-debian-81.log +0 -0
  307. data/test/integration/.kitchen/logs/test-fedora-21-i386.log +0 -0
  308. data/test/integration/.kitchen/logs/test-fedora-21.log +0 -0
  309. data/test/integration/.kitchen/logs/test-fedora-22.log +0 -0
  310. data/test/integration/.kitchen/logs/test-freebsd-102.log +0 -0
  311. data/test/integration/.kitchen/logs/test-freebsd-93.log +0 -0
  312. data/test/integration/.kitchen/logs/test-opensuse-132-i386.log +0 -0
  313. data/test/integration/.kitchen/logs/test-opensuse-132-x86-64.log +0 -0
  314. data/test/integration/.kitchen/logs/test-ubuntu-1004-i386.log +0 -0
  315. data/test/integration/.kitchen/logs/test-ubuntu-1004.log +0 -0
  316. data/test/integration/.kitchen/logs/test-ubuntu-1204-i386.log +0 -0
  317. data/test/integration/.kitchen/logs/test-ubuntu-1204.log +0 -0
  318. data/test/integration/.kitchen/logs/test-ubuntu-1404-i386.log +0 -0
  319. data/test/integration/.kitchen/logs/test-ubuntu-1404.log +0 -0
  320. data/test/integration/.kitchen/new-ubuntu-1404.yml +1 -0
  321. data/test/integration/Berksfile.lock +11 -0
  322. data/test/integration/TODO.md +15 -0
  323. data/test/integration/cookbooks/os_prepare/recipes/default.rb +1 -0
  324. data/test/integration/cookbooks/os_prepare/recipes/json_yaml_csv_ini.rb +13 -6
  325. data/test/integration/cookbooks/os_prepare/recipes/mount.rb +29 -0
  326. data/test/integration/test/.DS_Store +0 -0
  327. data/test/integration/test/integration/.DS_Store +0 -0
  328. data/test/integration/test/integration/default/.DS_Store +0 -0
  329. data/test/integration/test/integration/default/certificate_spec.rb +7 -0
  330. data/test/integration/test/integration/default/csv_spec.rb +7 -1
  331. data/test/integration/test/integration/default/file_spec.rb +29 -0
  332. data/test/integration/test/integration/default/ini_spec.rb +7 -1
  333. data/test/integration/test/integration/default/json_spec.rb +7 -1
  334. data/test/integration/test/integration/default/mount_spec.rb +10 -0
  335. data/test/integration/test/integration/default/yaml_spec.rb +7 -1
  336. data/test/serverspec/.kitchen.yml +18 -0
  337. data/test/serverspec/.kitchen/default-ubuntu-1404.yml +6 -0
  338. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  339. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  340. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -0
  341. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  342. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +27 -0
  343. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  344. data/test/serverspec/.kitchen/kitchen-vagrant/kitchen-serverspec-default-ubuntu-1404/Vagrantfile +9 -0
  345. data/test/serverspec/.kitchen/logs/default-ubuntu-1404.log +2 -0
  346. data/test/serverspec/.kitchen/logs/kitchen.log +3 -0
  347. data/test/serverspec/Berksfile +3 -0
  348. data/test/serverspec/Berksfile.lock +5 -0
  349. data/test/serverspec/TODO.md +2 -0
  350. data/test/serverspec/test/integration/default/serverspec/os_spec.rb +25 -0
  351. data/test/serverspec/test/integration/default/serverspec/spec_helper.rb +48 -0
  352. data/test/serverspec/test/integration/default/serverspec/sysctl_spec.rb +37 -0
  353. data/test/unit/metadata_test.rb +69 -0
  354. data/test/unit/mock/cmd/mount +1 -0
  355. data/test/unit/mock/cmd/mount-multiple +2 -0
  356. data/test/unit/mock/profiles/complete-meta/metadata.rb +7 -0
  357. data/test/unit/mock/profiles/complete-meta/test/.gitkeep +0 -0
  358. data/test/unit/mock/profiles/complete-profile/controls/filesystem_spec.rb +16 -0
  359. data/test/unit/mock/profiles/complete-profile/inspec.yml +10 -0
  360. data/test/unit/profile_context_test.rb +2 -2
  361. data/test/unit/profile_test.rb +63 -6
  362. data/test/unit/resources/file_test.rb +4 -0
  363. data/test/unit/resources/mount_test.rb +26 -0
  364. data/test/unit/utils/{content_parser_test.rb → passwd_parser_test.rb} +2 -2
  365. 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,2 @@
1
+ ---
2
+ LIBRARIAN_PUPPET_PATH: "/var/folders/jy/2bnrfb4s36jbjtzllvhhyqhw0000gn/T/default-ubuntu-1404-sandbox-20151211-3472-d311sn/modules"
@@ -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,2 @@
1
+ DEPENDENCIES
2
+
@@ -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
@@ -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,11 @@
1
+ DEPENDENCIES
2
+ prepare
3
+ path: .
4
+ metadata: true
5
+
6
+ GRAPH
7
+ apt (2.9.2)
8
+ prepare (1.0.0)
9
+ apt (>= 0.0.0)
10
+ yum (>= 0.0.0)
11
+ yum (3.8.1)
@@ -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