inspec 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -2
  3. data/Gemfile +1 -0
  4. data/README.md +2 -1
  5. data/bin/inspec +4 -1
  6. data/docs/dsl_resource.rst +2 -2
  7. data/docs/profiles.rst +5 -3
  8. data/examples/profile/README.md +1 -1
  9. data/inspec.gemspec +1 -1
  10. data/lib/inspec/version.rb +1 -1
  11. data/lib/resources/etc_group.rb +1 -1
  12. data/lib/resources/file.rb +5 -1
  13. data/lib/resources/package.rb +63 -9
  14. data/lib/resources/port.rb +47 -7
  15. data/lib/resources/service.rb +53 -15
  16. data/lib/resources/user.rb +42 -21
  17. data/lib/utils/parser.rb +85 -0
  18. data/test/helper.rb +8 -0
  19. data/test/integration/.kitchen.chef.yml +29 -0
  20. data/test/integration/.kitchen.ec2.yml +10 -4
  21. data/test/integration/.kitchen.shell.yml +19 -0
  22. data/test/integration/.kitchen/default-chef-solaris-1011.yml +6 -0
  23. data/test/integration/.kitchen/default-chef-windows-server-2008r2-standard.yml +7 -0
  24. data/test/integration/.kitchen/default-chef-windows-server-2012r2-standard.yml +7 -0
  25. data/test/integration/.kitchen/default-chris-rock-omnios-r151014.yml +6 -0
  26. data/test/integration/.kitchen/default-debian-81.yml +6 -0
  27. data/test/integration/.kitchen/default-omniti-omnios-r151014.yml +1 -0
  28. data/test/integration/.kitchen/default-windows-2008.yml +5 -0
  29. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-solaris-1011/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  30. data/test/integration/.kitchen/kitchen-vagrant/{kitchen-integration-default-fedora-22 → kitchen-integration-default-chef-solaris-1011}/.vagrant/machines/default/virtualbox/creator_uid +0 -0
  31. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-solaris-1011/.vagrant/machines/default/virtualbox/id +1 -0
  32. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-solaris-1011/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  33. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-solaris-1011/.vagrant/machines/default/virtualbox/private_key +27 -0
  34. data/test/integration/.kitchen/kitchen-vagrant/{kitchen-integration-default-fedora-22 → kitchen-integration-default-chef-solaris-1011}/.vagrant/machines/default/virtualbox/synced_folders +0 -0
  35. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-solaris-1011/Vagrantfile +8 -0
  36. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2008r2-standard/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  37. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2008r2-standard/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  38. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2008r2-standard/.vagrant/machines/default/virtualbox/id +1 -0
  39. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2008r2-standard/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  40. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2008r2-standard/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  41. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2008r2-standard/Vagrantfile +7 -0
  42. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2012r2-standard/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  43. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2012r2-standard/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  44. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2012r2-standard/.vagrant/machines/default/virtualbox/id +1 -0
  45. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2012r2-standard/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  46. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2012r2-standard/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  47. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chef-windows-server-2012r2-standard/Vagrantfile +8 -0
  48. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chris-rock-omnios-r151014/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  49. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chris-rock-omnios-r151014/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  50. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chris-rock-omnios-r151014/.vagrant/machines/default/virtualbox/id +1 -0
  51. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chris-rock-omnios-r151014/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  52. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chris-rock-omnios-r151014/.vagrant/machines/default/virtualbox/private_key +27 -0
  53. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chris-rock-omnios-r151014/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  54. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-chris-rock-omnios-r151014/Vagrantfile +8 -0
  55. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  56. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  57. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/id +1 -0
  58. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  59. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/private_key +27 -0
  60. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-debian-81/.vagrant/machines/default/virtualbox/synced_folders +1 -0
  61. data/test/integration/.kitchen/kitchen-vagrant/{kitchen-integration-default-fedora-22 → kitchen-integration-default-debian-81}/Vagrantfile +3 -3
  62. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-omniti-omnios-r151014/.vagrant/machines/default/virtualbox/action_set_name +1 -0
  63. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-omniti-omnios-r151014/.vagrant/machines/default/virtualbox/creator_uid +1 -0
  64. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-omniti-omnios-r151014/.vagrant/machines/default/virtualbox/id +1 -0
  65. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-omniti-omnios-r151014/.vagrant/machines/default/virtualbox/index_uuid +1 -0
  66. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-omniti-omnios-r151014/.vagrant/machines/default/virtualbox/private_key +27 -0
  67. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-omniti-omnios-r151014/Vagrantfile +8 -0
  68. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/action_set_name +1 -1
  69. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/id +1 -1
  70. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/index_uuid +1 -1
  71. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1204/.vagrant/machines/default/virtualbox/private_key +25 -25
  72. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/action_set_name +1 -1
  73. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/id +1 -1
  74. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/index_uuid +1 -1
  75. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-ubuntu-1404/.vagrant/machines/default/virtualbox/private_key +25 -25
  76. data/test/integration/.kitchen/logs/default-aws-linux.log +3 -0
  77. data/test/integration/.kitchen/logs/default-centos-511-i386.log +0 -2
  78. data/test/integration/.kitchen/logs/default-centos-511.log +0 -2
  79. data/test/integration/.kitchen/logs/default-centos-67-i386.log +0 -2
  80. data/test/integration/.kitchen/logs/default-centos-67.log +0 -2
  81. data/test/integration/.kitchen/logs/default-centos-7.log +3 -0
  82. data/test/integration/.kitchen/logs/default-centos-71.log +0 -2
  83. data/test/integration/.kitchen/logs/default-chef-solaris-1011.log +0 -0
  84. data/test/integration/.kitchen/logs/default-chef-windows-server-2008r2-standard.log +0 -0
  85. data/test/integration/.kitchen/logs/default-chef-windows-server-2012r2-standard.log +0 -0
  86. data/test/integration/.kitchen/logs/default-chris-rock-omnios-r151014.log +23 -0
  87. data/test/integration/.kitchen/logs/default-debian-6010-i386.log +0 -2
  88. data/test/integration/.kitchen/logs/default-debian-6010.log +0 -2
  89. data/test/integration/.kitchen/logs/default-debian-78-i386.log +0 -2
  90. data/test/integration/.kitchen/logs/default-debian-78.log +0 -2
  91. data/test/integration/.kitchen/logs/default-debian-8.log +3 -0
  92. data/test/integration/.kitchen/logs/default-debian-81-i386.log +0 -2
  93. data/test/integration/.kitchen/logs/default-debian-81.log +240 -2
  94. data/test/integration/.kitchen/logs/default-dusank-oi-server.log +0 -0
  95. data/test/integration/.kitchen/logs/default-fedora-21-i386.log +0 -2
  96. data/test/integration/.kitchen/logs/default-fedora-21.log +0 -2
  97. data/test/integration/.kitchen/logs/default-fedora-22.log +3 -0
  98. data/test/integration/.kitchen/logs/default-freebsd-102.log +0 -2
  99. data/test/integration/.kitchen/logs/default-freebsd-93.log +0 -2
  100. data/test/integration/.kitchen/logs/default-livinginthepast-smartos-base64.log +0 -0
  101. data/test/integration/.kitchen/logs/default-mint-172-cinnamon.log +0 -2
  102. data/test/integration/.kitchen/logs/default-omniti-omnios-r151014.log +0 -0
  103. data/test/integration/.kitchen/logs/default-opensuse-132-i386.log +0 -2
  104. data/test/integration/.kitchen/logs/default-opensuse-132-x86-64.log +0 -2
  105. data/test/integration/.kitchen/logs/default-redhat-65.log +3 -0
  106. data/test/integration/.kitchen/logs/default-redhat-71.log +3 -0
  107. data/test/integration/.kitchen/logs/default-suse-11sp3.log +3 -0
  108. data/test/integration/.kitchen/logs/default-suse-12.log +3 -0
  109. data/test/integration/.kitchen/logs/default-ubuntu-1004-i386.log +0 -2
  110. data/test/integration/.kitchen/logs/default-ubuntu-1004.log +0 -2
  111. data/test/integration/.kitchen/logs/default-ubuntu-1204-i386.log +0 -2
  112. data/test/integration/.kitchen/logs/default-ubuntu-1204.log +3 -0
  113. data/test/integration/.kitchen/logs/default-ubuntu-1404-i386.log +0 -2
  114. data/test/integration/.kitchen/logs/default-ubuntu-1404.log +3 -0
  115. data/test/integration/.kitchen/logs/default-ubuntu-1510.log +3 -0
  116. data/test/integration/.kitchen/logs/default-windows-2012r2.log +2 -41
  117. data/test/integration/.kitchen/logs/default-winrm.log +0 -0
  118. data/test/integration/.kitchen/logs/kitchen.log +14 -0
  119. data/test/integration/bootstrap.sh +3 -0
  120. data/test/integration/cookbooks/os_prepare/recipes/file.rb +2 -0
  121. data/test/integration/cookbooks/os_prepare/recipes/json_yaml_csv_ini.rb +2 -0
  122. data/test/integration/cookbooks/os_prepare/recipes/mount.rb +24 -20
  123. data/test/integration/cookbooks/os_prepare/templates/default/sv-default-svlog-run.erb +1 -2
  124. data/test/integration/test/integration/default/_debug_spec.rb +1 -1
  125. data/test/integration/test/integration/default/compare_matcher_spec.rb +15 -13
  126. data/test/integration/test/integration/default/etc_group_spec.rb +9 -8
  127. data/test/integration/test/integration/default/file_spec.rb +14 -4
  128. data/test/integration/test/integration/default/group_spec.rb +17 -7
  129. data/test/integration/test/integration/default/mount_spec.rb +9 -7
  130. data/test/integration/test/integration/default/package_spec.rb +16 -0
  131. data/test/integration/test/integration/default/port_spec.rb +8 -2
  132. data/test/integration/test/integration/default/service_spec.rb +4 -1
  133. data/test/integration/test/integration/default/user_spec.rb +37 -14
  134. data/test/unit/mock/cmd/pkg-info-system-file-system-zfs +8 -0
  135. data/test/unit/mock/cmd/pkginfo-l-SUNWzfsr +7 -0
  136. data/test/unit/mock/cmd/s11-netstat-an-finet-finet6 +32 -0
  137. data/test/unit/resources/file_test.rb +1 -0
  138. data/test/unit/resources/package_test.rb +18 -0
  139. data/test/unit/resources/port_test.rb +10 -0
  140. data/test/unit/utils/passwd_parser_test.rb +2 -0
  141. data/test/unit/utils/solaris_netstat_parser.rb +124 -0
  142. metadata +127 -42
  143. data/lib/extras/compliance/README.md +0 -15
  144. data/lib/extras/compliance/compliance.rb +0 -245
  145. data/test/integration/.kitchen/default-aws-linux.yml +0 -4
  146. data/test/integration/.kitchen/default-centos-7.yml +0 -4
  147. data/test/integration/.kitchen/default-debian-8.yml +0 -4
  148. data/test/integration/.kitchen/default-fedora-22.yml +0 -4
  149. data/test/integration/.kitchen/default-redhat-65.yml +0 -4
  150. data/test/integration/.kitchen/default-redhat-71.yml +0 -4
  151. data/test/integration/.kitchen/default-suse-11sp3.yml +0 -4
  152. data/test/integration/.kitchen/default-suse-12.yml +0 -4
  153. data/test/integration/.kitchen/default-ubuntu-1204.yml +0 -3
  154. data/test/integration/.kitchen/default-ubuntu-1404.yml +0 -4
  155. data/test/integration/.kitchen/default-windows-2012r2.yml +0 -2
  156. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/action_set_name +0 -1
  157. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/id +0 -1
  158. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/index_uuid +0 -1
  159. data/test/integration/.kitchen/kitchen-vagrant/kitchen-integration-default-fedora-22/.vagrant/machines/default/virtualbox/private_key +0 -27
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.193471 #11606] INFO -- default-fedora-21-i386: -----> Destroying <default-fedora-21-i386>...
2
- I, [2016-01-24T16:12:07.193781 #11606] INFO -- default-fedora-21-i386: Finished destroying <default-fedora-21-i386> (0m0.00s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.193104 #11606] INFO -- default-fedora-21: -----> Destroying <default-fedora-21>...
2
- I, [2016-01-24T16:12:07.193355 #11606] INFO -- default-fedora-21: Finished destroying <default-fedora-21> (0m0.00s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:29.159178 #96612] INFO -- default-fedora-22: -----> Destroying <default-fedora-22>...
2
+ I, [2016-01-29T18:18:29.427875 #96612] INFO -- default-fedora-22: EC2 instance <i-b738b90b> destroyed.
3
+ I, [2016-01-29T18:18:29.428400 #96612] INFO -- default-fedora-22: Finished destroying <default-fedora-22> (0m0.27s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.194676 #11606] INFO -- default-freebsd-102: -----> Destroying <default-freebsd-102>...
2
- I, [2016-01-24T16:12:07.195143 #11606] INFO -- default-freebsd-102: Finished destroying <default-freebsd-102> (0m0.00s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.194301 #11606] INFO -- default-freebsd-93: -----> Destroying <default-freebsd-93>...
2
- I, [2016-01-24T16:12:07.194552 #11606] INFO -- default-freebsd-93: Finished destroying <default-freebsd-93> (0m0.00s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.199765 #11606] INFO -- default-mint-172-cinnamon: -----> Destroying <default-mint-172-cinnamon>...
2
- I, [2016-01-24T16:12:07.200088 #11606] INFO -- default-mint-172-cinnamon: Finished destroying <default-mint-172-cinnamon> (0m0.00s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.196063 #11606] INFO -- default-opensuse-132-i386: -----> Destroying <default-opensuse-132-i386>...
2
- I, [2016-01-24T16:12:07.196544 #11606] INFO -- default-opensuse-132-i386: Finished destroying <default-opensuse-132-i386> (0m0.00s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.195391 #11606] INFO -- default-opensuse-132-x86-64: -----> Destroying <default-opensuse-132-x86-64>...
2
- I, [2016-01-24T16:12:07.195808 #11606] INFO -- default-opensuse-132-x86-64: Finished destroying <default-opensuse-132-x86-64> (0m0.00s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:27.722177 #96612] INFO -- default-redhat-65: -----> Destroying <default-redhat-65>...
2
+ I, [2016-01-29T18:18:27.959176 #96612] INFO -- default-redhat-65: EC2 instance <i-ca38b976> destroyed.
3
+ I, [2016-01-29T18:18:27.960524 #96612] INFO -- default-redhat-65: Finished destroying <default-redhat-65> (0m0.24s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:27.961358 #96612] INFO -- default-redhat-71: -----> Destroying <default-redhat-71>...
2
+ I, [2016-01-29T18:18:28.228198 #96612] INFO -- default-redhat-71: EC2 instance <i-4238b9fe> destroyed.
3
+ I, [2016-01-29T18:18:28.229964 #96612] INFO -- default-redhat-71: Finished destroying <default-redhat-71> (0m0.27s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:26.706567 #96612] INFO -- default-suse-11sp3: -----> Destroying <default-suse-11sp3>...
2
+ I, [2016-01-29T18:18:27.453489 #96612] INFO -- default-suse-11sp3: EC2 instance <i-b938b905> destroyed.
3
+ I, [2016-01-29T18:18:27.454121 #96612] INFO -- default-suse-11sp3: Finished destroying <default-suse-11sp3> (0m0.75s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:27.454966 #96612] INFO -- default-suse-12: -----> Destroying <default-suse-12>...
2
+ I, [2016-01-29T18:18:27.719270 #96612] INFO -- default-suse-12: EC2 instance <i-4538b9f9> destroyed.
3
+ I, [2016-01-29T18:18:27.721314 #96612] INFO -- default-suse-12: Finished destroying <default-suse-12> (0m0.26s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.199317 #11606] INFO -- default-ubuntu-1004-i386: -----> Destroying <default-ubuntu-1004-i386>...
2
- I, [2016-01-24T16:12:07.199645 #11606] INFO -- default-ubuntu-1004-i386: Finished destroying <default-ubuntu-1004-i386> (0m0.00s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.198852 #11606] INFO -- default-ubuntu-1004: -----> Destroying <default-ubuntu-1004>...
2
- I, [2016-01-24T16:12:07.199193 #11606] INFO -- default-ubuntu-1004: Finished destroying <default-ubuntu-1004> (0m0.00s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.198374 #11606] INFO -- default-ubuntu-1204-i386: -----> Destroying <default-ubuntu-1204-i386>...
2
- I, [2016-01-24T16:12:07.198711 #11606] INFO -- default-ubuntu-1204-i386: Finished destroying <default-ubuntu-1204-i386> (0m0.00s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:28.232601 #96612] INFO -- default-ubuntu-1204: -----> Destroying <default-ubuntu-1204>...
2
+ I, [2016-01-29T18:18:28.575969 #96612] INFO -- default-ubuntu-1204: EC2 instance <i-3c39b880> destroyed.
3
+ I, [2016-01-29T18:18:28.576602 #96612] INFO -- default-ubuntu-1204: Finished destroying <default-ubuntu-1204> (0m0.34s).
@@ -1,2 +0,0 @@
1
- I, [2016-01-24T16:12:07.197214 #11606] INFO -- default-ubuntu-1404-i386: -----> Destroying <default-ubuntu-1404-i386>...
2
- I, [2016-01-24T16:12:07.197515 #11606] INFO -- default-ubuntu-1404-i386: Finished destroying <default-ubuntu-1404-i386> (0m0.00s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:28.577693 #96612] INFO -- default-ubuntu-1404: -----> Destroying <default-ubuntu-1404>...
2
+ I, [2016-01-29T18:18:28.882177 #96612] INFO -- default-ubuntu-1404: EC2 instance <i-b838b904> destroyed.
3
+ I, [2016-01-29T18:18:28.883859 #96612] INFO -- default-ubuntu-1404: Finished destroying <default-ubuntu-1404> (0m0.30s).
@@ -0,0 +1,3 @@
1
+ I, [2016-01-29T18:18:28.884908 #96612] INFO -- default-ubuntu-1510: -----> Destroying <default-ubuntu-1510>...
2
+ I, [2016-01-29T18:18:29.156782 #96612] INFO -- default-ubuntu-1510: EC2 instance <i-3d39b881> destroyed.
3
+ I, [2016-01-29T18:18:29.158221 #96612] INFO -- default-ubuntu-1510: Finished destroying <default-ubuntu-1510> (0m0.27s).
@@ -1,41 +1,2 @@
1
- I, [2016-01-25T17:25:07.497657 #42763] INFO -- default-windows-2012r2: -----> Creating <default-windows-2012r2>...
2
- I, [2016-01-25T17:25:07.498020 #42763] INFO -- default-windows-2012r2: If you are not using an account that qualifies under the AWS
3
- free-tier, you may be charged to run these suites. The charge
4
- should be minimal, but neither Test Kitchen nor its maintainers
5
- are responsible for your incurred costs.
6
-
7
- E, [2016-01-25T17:25:07.834439 #42763] ERROR -- default-windows-2012r2: Create failed on instance <default-windows-2012r2>.
8
- E, [2016-01-25T17:25:07.834698 #42763] ERROR -- default-windows-2012r2: ------Exception-------
9
- E, [2016-01-25T17:25:07.834716 #42763] ERROR -- default-windows-2012r2: Class: Aws::EC2::Errors::AuthFailure
10
- E, [2016-01-25T17:25:07.834726 #42763] ERROR -- default-windows-2012r2: Message: Not authorized for images: [ami-f2f5f9ef]
11
- E, [2016-01-25T17:25:07.834735 #42763] ERROR -- default-windows-2012r2: ------Backtrace-------
12
- E, [2016-01-25T17:25:07.834743 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.2.13/lib/seahorse/client/plugins/raise_response_errors.rb:15:in `call'
13
- E, [2016-01-25T17:25:07.834755 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.2.13/lib/aws-sdk-core/plugins/param_converter.rb:20:in `call'
14
- E, [2016-01-25T17:25:07.834765 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.2.13/lib/seahorse/client/plugins/response_target.rb:21:in `call'
15
- E, [2016-01-25T17:25:07.834773 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.2.13/lib/seahorse/client/request.rb:70:in `send_request'
16
- E, [2016-01-25T17:25:07.834782 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-core-2.2.13/lib/seahorse/client/base.rb:207:in `block (2 levels) in define_operation_methods'
17
- E, [2016-01-25T17:25:07.834791 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-resources-2.2.13/lib/aws-sdk-resources/request.rb:24:in `call'
18
- E, [2016-01-25T17:25:07.834799 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-resources-2.2.13/lib/aws-sdk-resources/operations.rb:41:in `call'
19
- E, [2016-01-25T17:25:07.834808 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-resources-2.2.13/lib/aws-sdk-resources/operations.rb:87:in `call'
20
- E, [2016-01-25T17:25:07.834816 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/aws-sdk-resources-2.2.13/lib/aws-sdk-resources/operation_methods.rb:19:in `block in add_operation'
21
- E, [2016-01-25T17:25:07.834825 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/kitchen-ec2-0.10.0/lib/kitchen/driver/aws/client.rb:82:in `create_instance'
22
- E, [2016-01-25T17:25:07.834833 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/kitchen-ec2-0.10.0/lib/kitchen/driver/ec2.rb:291:in `submit_server'
23
- E, [2016-01-25T17:25:07.834842 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/kitchen-ec2-0.10.0/lib/kitchen/driver/ec2.rb:192:in `create'
24
- E, [2016-01-25T17:25:07.834853 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:431:in `public_send'
25
- E, [2016-01-25T17:25:07.834862 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:431:in `block in perform_action'
26
- E, [2016-01-25T17:25:07.834871 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:495:in `call'
27
- E, [2016-01-25T17:25:07.834931 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:495:in `synchronize_or_call'
28
- E, [2016-01-25T17:25:07.834943 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:460:in `block in action'
29
- E, [2016-01-25T17:25:07.834952 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/benchmark.rb:288:in `measure'
30
- E, [2016-01-25T17:25:07.834961 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:459:in `action'
31
- E, [2016-01-25T17:25:07.834969 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:431:in `perform_action'
32
- E, [2016-01-25T17:25:07.834977 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:359:in `create_action'
33
- E, [2016-01-25T17:25:07.834986 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:348:in `block in transition_to'
34
- E, [2016-01-25T17:25:07.834994 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:347:in `each'
35
- E, [2016-01-25T17:25:07.835005 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:347:in `transition_to'
36
- E, [2016-01-25T17:25:07.835015 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/instance.rb:138:in `converge'
37
- E, [2016-01-25T17:25:07.835023 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/command.rb:176:in `public_send'
38
- E, [2016-01-25T17:25:07.835032 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/test-kitchen-1.5.0/lib/kitchen/command.rb:176:in `block (2 levels) in run_action'
39
- E, [2016-01-25T17:25:07.835040 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `call'
40
- E, [2016-01-25T17:25:07.835049 #42763] ERROR -- default-windows-2012r2: /Users/chartmann/.rvm/rubies/ruby-2.2.1/lib/ruby/gems/2.2.0/gems/logging-2.0.0/lib/logging/diagnostic_context.rb:448:in `block in create_with_logging_context'
41
- E, [2016-01-25T17:25:07.835057 #42763] ERROR -- default-windows-2012r2: ----------------------
1
+ I, [2016-01-29T18:18:26.704447 #96612] INFO -- default-windows-2012r2: -----> Destroying <default-windows-2012r2>...
2
+ I, [2016-01-29T18:18:26.705620 #96612] INFO -- default-windows-2012r2: Finished destroying <default-windows-2012r2> (0m0.00s).
@@ -0,0 +1,14 @@
1
+ I, [2016-01-29T18:18:25.774560 #96612] INFO -- Kitchen: -----> Starting Kitchen (v1.5.0)
2
+ I, [2016-01-29T18:18:26.704395 #96612] INFO -- Kitchen: -----> Destroying <default-windows-2012r2>...
3
+ I, [2016-01-29T18:18:26.706532 #96612] INFO -- Kitchen: -----> Destroying <default-suse-11sp3>...
4
+ I, [2016-01-29T18:18:27.454920 #96612] INFO -- Kitchen: -----> Destroying <default-suse-12>...
5
+ I, [2016-01-29T18:18:27.722146 #96612] INFO -- Kitchen: -----> Destroying <default-redhat-65>...
6
+ I, [2016-01-29T18:18:27.961328 #96612] INFO -- Kitchen: -----> Destroying <default-redhat-71>...
7
+ I, [2016-01-29T18:18:28.232545 #96612] INFO -- Kitchen: -----> Destroying <default-ubuntu-1204>...
8
+ I, [2016-01-29T18:18:28.577646 #96612] INFO -- Kitchen: -----> Destroying <default-ubuntu-1404>...
9
+ I, [2016-01-29T18:18:28.884854 #96612] INFO -- Kitchen: -----> Destroying <default-ubuntu-1510>...
10
+ I, [2016-01-29T18:18:29.159142 #96612] INFO -- Kitchen: -----> Destroying <default-fedora-22>...
11
+ I, [2016-01-29T18:18:29.429401 #96612] INFO -- Kitchen: -----> Destroying <default-debian-8>...
12
+ I, [2016-01-29T18:18:29.682464 #96612] INFO -- Kitchen: -----> Destroying <default-centos-7>...
13
+ I, [2016-01-29T18:18:29.918558 #96612] INFO -- Kitchen: -----> Destroying <default-aws-linux>...
14
+ I, [2016-01-29T18:18:30.349123 #96612] INFO -- Kitchen: -----> Kitchen is finished. (0m4.57s)
@@ -0,0 +1,3 @@
1
+ #!/bin/bash
2
+
3
+ echo "hello I am here"
@@ -11,6 +11,8 @@ if node['platform_family'] != 'windows'
11
11
  'system'
12
12
  when 'freebsd'
13
13
  'wheel'
14
+ when 'solaris', 'solaris2'
15
+ 'sys'
14
16
  else
15
17
  'root'
16
18
  end
@@ -9,6 +9,8 @@ gid = case node['platform_family']
9
9
  'system'
10
10
  when 'freebsd'
11
11
  'wheel'
12
+ when 'solaris', 'solaris2'
13
+ 'sys'
12
14
  else
13
15
  'root'
14
16
  end
@@ -4,26 +4,30 @@
4
4
  #
5
5
  # file mount tests
6
6
 
7
- # copy iso file for mount tests
8
- # NB created using `mkdir empty; mkisofs -o empty.iso empty/`
9
- cookbook_file '/root/empty.iso' do
10
- owner 'root'
11
- group 'root'
12
- mode '0755'
13
- action :create
14
- end
7
+ case node['platform']
8
+ when 'ubuntu', 'rhel', 'centos', 'fedora'
15
9
 
16
- # create mount directory
17
- directory '/mnt/iso-disk' do
18
- owner 'root'
19
- group 'root'
20
- mode '0755'
21
- action :create
22
- end
10
+ # copy iso file for mount tests
11
+ # NB created using `mkdir empty; mkisofs -o empty.iso empty/`
12
+ cookbook_file '/root/empty.iso' do
13
+ owner 'root'
14
+ group 'root'
15
+ mode '0755'
16
+ action :create
17
+ end
18
+
19
+ # create mount directory
20
+ directory '/mnt/iso-disk' do
21
+ owner 'root'
22
+ group 'root'
23
+ mode '0755'
24
+ action :create
25
+ end
23
26
 
24
- # mount -o loop /root/empty.iso /mnt/iso-disk
25
- mount '/mnt/iso-disk' do
26
- device '/root/empty.iso'
27
- options 'loop'
28
- action [:mount, :enable]
27
+ # mount -o loop /root/empty.iso /mnt/iso-disk
28
+ mount '/mnt/iso-disk' do
29
+ device '/root/empty.iso'
30
+ options 'loop'
31
+ action [:mount, :enable]
32
+ end
29
33
  end
@@ -1,3 +1,2 @@
1
1
  #!/bin/sh
2
- exec > /dev/null
3
- exec yes
2
+ exec tail -f /dev/null
@@ -1 +1 @@
1
- p "You are currently running on OS family: #{os[:family] || 'unknown'}, OS release: #{os[:release] || 'unknown'}"
1
+ p "You are currently running on OS: #{os[:name] || 'unknown'}, OS release: #{os[:release] || 'unknown'}, OS family: #{os[:family] || 'unknown'}"
@@ -1,19 +1,21 @@
1
1
  # encoding: utf-8
2
2
 
3
- # uses the `cmp` matcher instead of the eq matcher
4
- describe sshd_config do
5
- its('Port') { should eq '22' }
6
- its('Port') { should_not eq 22 }
3
+ if os.linux?
4
+ # uses the `cmp` matcher instead of the eq matcher
5
+ describe sshd_config do
6
+ its('Port') { should eq '22' }
7
+ its('Port') { should_not eq 22 }
7
8
 
8
- its('Port') { should cmp '22' }
9
- its('Port') { should cmp 22 }
10
- its('Port') { should cmp 22.0 }
11
- its('Port') { should_not cmp 22.1 }
9
+ its('Port') { should cmp '22' }
10
+ its('Port') { should cmp 22 }
11
+ its('Port') { should cmp 22.0 }
12
+ its('Port') { should_not cmp 22.1 }
12
13
 
13
- its('LogLevel') { should eq 'INFO' }
14
- its('LogLevel') { should_not eq 'info'}
14
+ its('LogLevel') { should eq 'INFO' }
15
+ its('LogLevel') { should_not eq 'info'}
15
16
 
16
- its('LogLevel') { should cmp 'INFO' }
17
- its('LogLevel') { should cmp 'info' }
18
- its('LogLevel') { should cmp 'InfO' }
17
+ its('LogLevel') { should cmp 'INFO' }
18
+ its('LogLevel') { should cmp 'info' }
19
+ its('LogLevel') { should cmp 'InfO' }
20
+ end
19
21
  end
@@ -1,13 +1,14 @@
1
1
  # encoding: utf-8
2
2
 
3
- root_group = case os[:family]
4
- when 'aix'
5
- 'system'
6
- when 'freebsd'
7
- 'wheel'
8
- else
9
- 'root'
10
- end
3
+ root_group = 'root'
4
+
5
+ if os[:family] == 'aix'
6
+ root_group = 'system'
7
+ elsif os[:family] == 'freebsd'
8
+ root_group = 'wheel'
9
+ elsif os.solaris?
10
+ root_group = 'sys'
11
+ end
11
12
 
12
13
  if os.unix?
13
14
  describe etc_group do
@@ -1,7 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- case os[:family]
4
- when 'freebsd'
3
+ if os[:family] == 'freebsd'
5
4
  filedata = {
6
5
  user: 'root',
7
6
  group: 'wheel',
@@ -9,7 +8,7 @@ when 'freebsd'
9
8
  dir_md5sum: '598f4fe64aefab8f00bcbea4c9239abf',
10
9
  dir_sha256sum: '9b4fb24edd6d1d8830e272398263cdbf026b97392cc35387b991dc0248a628f9',
11
10
  }
12
- when 'aix'
11
+ elsif os[:family] == 'aix'
13
12
  filedata = {
14
13
  user: 'root',
15
14
  group: 'system',
@@ -17,6 +16,14 @@ when 'aix'
17
16
  dir_md5sum: nil,
18
17
  dir_sha256sum: nil,
19
18
  }
19
+ elsif os.solaris?
20
+ filedata = {
21
+ user: 'root',
22
+ group: 'sys',
23
+ dir_content: nil,
24
+ dir_md5sum: nil,
25
+ dir_sha256sum: nil,
26
+ }
20
27
  else
21
28
  filedata = {
22
29
  user: 'root',
@@ -116,7 +123,9 @@ if os.unix?
116
123
  its('group') { should eq filedata[:group] }
117
124
  its('type') { should eq :directory }
118
125
  end
126
+ end
119
127
 
128
+ if os.linux?
120
129
  # for server spec compatibility
121
130
  # Do not use `.with` or `.only_with`, this syntax is deprecated and will be removed
122
131
  # in InSpec version 1
@@ -140,8 +149,9 @@ if os.unix?
140
149
  })
141
150
  }
142
151
  end
152
+ end
143
153
 
144
- elsif os.windows?
154
+ if os.windows?
145
155
  describe file('C:\\Windows') do
146
156
  it { should exist }
147
157
  it { should be_directory }
@@ -11,10 +11,7 @@ if os.linux?
11
11
  it { should_not exist }
12
12
  its('gid') { should eq nil }
13
13
  end
14
- end
15
-
16
- if os[:family] == 'freebsd'
17
-
14
+ elsif os[:family] == 'freebsd'
18
15
  describe group('wheel') do
19
16
  it { should exist }
20
17
  its('gid') { should eq 0 }
@@ -29,9 +26,7 @@ if os[:family] == 'freebsd'
29
26
  it { should_not exist }
30
27
  its('gid') { should eq nil }
31
28
  end
32
- end
33
-
34
- if os[:family] == 'aix'
29
+ elsif os[:family] == 'aix'
35
30
  describe group('system') do
36
31
  it { should exist }
37
32
  its('gid') { should eq 0 }
@@ -42,6 +37,21 @@ if os[:family] == 'aix'
42
37
  its('gid') { should eq 2 }
43
38
  end
44
39
 
40
+ describe group('noroot') do
41
+ it { should_not exist }
42
+ its('gid') { should eq nil }
43
+ end
44
+ elsif os.solaris?
45
+ describe group('root') do
46
+ it { should exist }
47
+ its('gid') { should eq 0 }
48
+ end
49
+
50
+ describe group('bin') do
51
+ it { should exist }
52
+ its('gid') { should eq 2 }
53
+ end
54
+
45
55
  describe group('noroot') do
46
56
  it { should_not exist }
47
57
  its('gid') { should eq nil }
@@ -1,10 +1,12 @@
1
1
  # encoding: utf-8
2
2
 
3
- # instead of `.with` or `.only_with` we recommend to use the `mount` resource
4
- describe mount '/mnt/iso-disk' do
5
- it { should be_mounted }
6
- its('count') { should eq 1 }
7
- its('device') { should eq '/root/empty.iso' }
8
- its('type') { should eq 'iso9660' }
9
- its('options') { should eq ['ro'] }
3
+ if os.linux?
4
+ # instead of `.with` or `.only_with` we recommend to use the `mount` resource
5
+ describe mount '/mnt/iso-disk' do
6
+ it { should be_mounted }
7
+ its('count') { should eq 1 }
8
+ its('device') { should eq '/root/empty.iso' }
9
+ its('type') { should eq 'iso9660' }
10
+ its('options') { should eq ['ro'] }
11
+ end
10
12
  end
@@ -10,6 +10,22 @@ when 'aix'
10
10
  it { should be_installed }
11
11
  its('version') { should match /^(6|7)[.|\d]+\d$/ }
12
12
  end
13
+ when 'solaris'
14
+
15
+ if os[:release] == '11'
16
+ pkg = 'system/file-system/zfs'
17
+ ver = /^0\.5.+$/
18
+ else
19
+ pkg = 'SUNWzfsr'
20
+ ver = /^11\.10.+$/
21
+ end
22
+
23
+ describe package(pkg) do
24
+ it { should be_installed }
25
+ its('version') { should match ver }
26
+ end
27
+
28
+
13
29
  end
14
30
 
15
31
  describe package('nginx') do
@@ -1,15 +1,21 @@
1
1
  # encoding: utf-8
2
2
 
3
+ # check that ssh runs
3
4
  if os.unix?
4
- # check that ssh runs
5
5
  describe port(22) do
6
6
  it { should be_listening }
7
7
  its('protocols') { should include('tcp') }
8
8
  its('protocols') { should_not include('udp') }
9
- its('processes') { should include 'sshd' }
10
9
  end
11
10
 
12
11
  describe port(65432) do
13
12
  it { should_not be_listening }
14
13
  end
15
14
  end
15
+
16
+ # extra test for linux
17
+ if os.linux?
18
+ describe port(22) do
19
+ its('processes') { should include 'sshd' }
20
+ end
21
+ end