vagrant-clone 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (306) hide show
  1. checksums.yaml +4 -4
  2. data/.idea/.rakeTasks +7 -0
  3. data/.idea/inspectionProfiles/Project_Default.xml +6 -0
  4. data/.idea/misc.xml +4 -0
  5. data/.idea/modules.xml +8 -0
  6. data/.idea/runConfigurations/clone.xml +21 -0
  7. data/.idea/runConfigurations/libvirt.xml +21 -0
  8. data/.idea/vagrant-clone.iml +114 -0
  9. data/.idea/vcs.xml +6 -0
  10. data/.idea/workspace.xml +948 -0
  11. data/Gemfile +9 -3
  12. data/Gemfile.lock +123 -37
  13. data/Rakefile +2 -1
  14. data/Vagrantfile +9 -0
  15. data/cookbooks/apt/CHANGELOG.md +321 -0
  16. data/cookbooks/apt/CONTRIBUTING.md +2 -0
  17. data/cookbooks/apt/MAINTAINERS.md +15 -0
  18. data/cookbooks/apt/README.md +250 -0
  19. data/cookbooks/apt/attributes/default.rb +57 -0
  20. data/cookbooks/apt/files/15update-stamp +1 -0
  21. data/cookbooks/apt/files/apt-proxy-v2.conf +50 -0
  22. data/cookbooks/apt/libraries/helpers.rb +49 -0
  23. data/cookbooks/apt/libraries/matchers.rb +16 -0
  24. data/cookbooks/apt/metadata.json +1 -0
  25. data/cookbooks/apt/recipes/cacher-client.rb +52 -0
  26. data/cookbooks/apt/recipes/cacher-ng.rb +39 -0
  27. data/cookbooks/apt/recipes/default.rb +93 -0
  28. data/cookbooks/apt/recipes/unattended-upgrades.rb +47 -0
  29. data/cookbooks/apt/resources/preference.rb +90 -0
  30. data/cookbooks/apt/templates/01proxy.erb +11 -0
  31. data/cookbooks/apt/templates/10dpkg-options.erb +8 -0
  32. data/cookbooks/apt/templates/10recommends.erb +3 -0
  33. data/cookbooks/apt/templates/20auto-upgrades.erb +5 -0
  34. data/cookbooks/apt/templates/50unattended-upgrades.erb +75 -0
  35. data/cookbooks/apt/templates/acng.conf.erb +275 -0
  36. data/cookbooks/apt/templates/unattended-upgrades.seed.erb +1 -0
  37. data/cookbooks/build-essential/.foodcritic +1 -0
  38. data/cookbooks/build-essential/CHANGELOG.md +257 -0
  39. data/cookbooks/build-essential/CONTRIBUTING.md +2 -0
  40. data/cookbooks/build-essential/MAINTAINERS.md +15 -0
  41. data/cookbooks/build-essential/README.md +134 -0
  42. data/cookbooks/build-essential/attributes/default.rb +21 -0
  43. data/cookbooks/build-essential/libraries/matchers.rb +9 -0
  44. data/cookbooks/build-essential/metadata.json +1 -0
  45. data/cookbooks/build-essential/recipes/_windows.rb +53 -0
  46. data/cookbooks/build-essential/recipes/default.rb +24 -0
  47. data/cookbooks/build-essential/resources/build_essential.rb +106 -0
  48. data/cookbooks/build-essential/resources/xcode_command_line_tools.rb +61 -0
  49. data/cookbooks/compat_resource/CHANGELOG.md +53 -0
  50. data/cookbooks/compat_resource/CONTRIBUTING.md +2 -0
  51. data/cookbooks/compat_resource/MAINTAINERS.md +16 -0
  52. data/cookbooks/compat_resource/README.md +60 -0
  53. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/constants.rb +47 -0
  54. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/delayed_evaluator.rb +40 -0
  55. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/core.rb +73 -0
  56. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb +315 -0
  57. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/platform_introspection.rb +292 -0
  58. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/recipe.rb +37 -0
  59. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/universal.rb +70 -0
  60. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/lazy_module_include.rb +98 -0
  61. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/notifying_block.rb +74 -0
  62. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb +510 -0
  63. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/powershell_out.rb +117 -0
  64. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/properties.rb +328 -0
  65. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/property.rb +713 -0
  66. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_repository.rb +269 -0
  67. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_update.rb +105 -0
  68. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/noop.rb +56 -0
  69. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/support/yum_repo.erb +132 -0
  70. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/systemd_unit.rb +253 -0
  71. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/yum_repository.rb +136 -0
  72. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb +164 -0
  73. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/action_class.rb +114 -0
  74. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_repository.rb +65 -0
  75. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_update.rb +52 -0
  76. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/systemd_unit.rb +81 -0
  77. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/yum_repository.rb +97 -0
  78. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource.rb +214 -0
  79. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb +174 -0
  80. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef.rb +29 -0
  81. data/cookbooks/compat_resource/files/lib/chef_compat/mixin/properties.rb +8 -0
  82. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/exceptions.rb +10 -0
  83. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/log.rb +30 -0
  84. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/mixin/params_validate.rb +17 -0
  85. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/node.rb +9 -0
  86. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/property.rb +15 -0
  87. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/provider.rb +65 -0
  88. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe.rb +118 -0
  89. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe_hook.rb +20 -0
  90. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource/lwrp_base.rb +60 -0
  91. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource.rb +156 -0
  92. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb +167 -0
  93. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_list.rb +49 -0
  94. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_set.rb +49 -0
  95. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb +103 -0
  96. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb +691 -0
  97. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb +153 -0
  98. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef.rb +33 -0
  99. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches.rb +41 -0
  100. data/cookbooks/compat_resource/files/lib/chef_compat/property.rb +6 -0
  101. data/cookbooks/compat_resource/files/lib/chef_compat/recipe.rb +8 -0
  102. data/cookbooks/compat_resource/files/lib/chef_compat/resource/lwrp_base.rb +44 -0
  103. data/cookbooks/compat_resource/files/lib/chef_compat/resource.rb +56 -0
  104. data/cookbooks/compat_resource/files/lib/chef_upstream_version.rb +3 -0
  105. data/cookbooks/compat_resource/files/lib/compat_resource.rb +35 -0
  106. data/cookbooks/compat_resource/libraries/autoload.rb +31 -0
  107. data/cookbooks/compat_resource/metadata.json +1 -0
  108. data/cookbooks/inifile_chef_gem/CHANGELOG.md +11 -0
  109. data/cookbooks/inifile_chef_gem/README.md +46 -0
  110. data/cookbooks/inifile_chef_gem/metadata.json +51 -0
  111. data/cookbooks/inifile_chef_gem/metadata.rb +11 -0
  112. data/cookbooks/inifile_chef_gem/resources/default.rb +28 -0
  113. data/cookbooks/mariadb/CHANGELOG.md +332 -0
  114. data/cookbooks/mariadb/README.md +225 -0
  115. data/cookbooks/mariadb/attributes/default.rb +199 -0
  116. data/cookbooks/mariadb/libraries/mariadb_conn_helper.rb +53 -0
  117. data/cookbooks/mariadb/libraries/mariadb_helper.rb +216 -0
  118. data/cookbooks/mariadb/libraries/matchers.rb +21 -0
  119. data/cookbooks/mariadb/metadata.json +1 -0
  120. data/cookbooks/mariadb/providers/configuration.rb +39 -0
  121. data/cookbooks/mariadb/recipes/_audit_plugin.rb +63 -0
  122. data/cookbooks/mariadb/recipes/_debian_galera.rb +62 -0
  123. data/cookbooks/mariadb/recipes/_debian_server.rb +78 -0
  124. data/cookbooks/mariadb/recipes/_mariadb_repository.rb +29 -0
  125. data/cookbooks/mariadb/recipes/_redhat_client.rb +27 -0
  126. data/cookbooks/mariadb/recipes/_redhat_galera.rb +55 -0
  127. data/cookbooks/mariadb/recipes/_redhat_server.rb +58 -0
  128. data/cookbooks/mariadb/recipes/client.rb +47 -0
  129. data/cookbooks/mariadb/recipes/config.rb +115 -0
  130. data/cookbooks/mariadb/recipes/default.rb +46 -0
  131. data/cookbooks/mariadb/recipes/devel.rb +41 -0
  132. data/cookbooks/mariadb/recipes/galera.rb +324 -0
  133. data/cookbooks/mariadb/recipes/plugins.rb +3 -0
  134. data/cookbooks/mariadb/recipes/repository.rb +45 -0
  135. data/cookbooks/mariadb/recipes/server.rb +157 -0
  136. data/cookbooks/mariadb/resources/configuration.rb +13 -0
  137. data/cookbooks/mariadb/resources/mysql2_gem.rb +25 -0
  138. data/cookbooks/mariadb/resources/replication.rb +192 -0
  139. data/cookbooks/mariadb/templates/default/conf.d.generic.erb +19 -0
  140. data/cookbooks/mariadb/templates/default/debian.cnf.erb +12 -0
  141. data/cookbooks/mariadb/templates/default/mariadb-server.seed.erb +13 -0
  142. data/cookbooks/mariadb/templates/default/mariadb_grants.erb +42 -0
  143. data/cookbooks/mariadb/templates/default/my.cnf.erb +210 -0
  144. data/cookbooks/mariadb/templates/default/root.cnf.erb +5 -0
  145. data/cookbooks/mingw/.foodcritic +1 -0
  146. data/cookbooks/mingw/CHANGELOG.md +50 -0
  147. data/cookbooks/mingw/CONTRIBUTING.md +2 -0
  148. data/cookbooks/mingw/MAINTAINERS.md +14 -0
  149. data/cookbooks/mingw/README.md +133 -0
  150. data/cookbooks/mingw/files/default/bash.bat +17 -0
  151. data/cookbooks/mingw/files/default/custom-upgrade.sh +23 -0
  152. data/cookbooks/mingw/files/default/custom_prefix.sh +13 -0
  153. data/cookbooks/mingw/files/default/pthread.h +719 -0
  154. data/cookbooks/mingw/files/default/time.h +297 -0
  155. data/cookbooks/mingw/libraries/_helper.rb +38 -0
  156. data/cookbooks/mingw/metadata.json +1 -0
  157. data/cookbooks/mingw/recipes/default.rb +19 -0
  158. data/cookbooks/mingw/resources/get.rb +56 -0
  159. data/cookbooks/mingw/resources/msys2_package.rb +139 -0
  160. data/cookbooks/mingw/resources/tdm_gcc.rb +114 -0
  161. data/cookbooks/ohai/.foodcritic +2 -0
  162. data/cookbooks/ohai/CHANGELOG.md +166 -0
  163. data/cookbooks/ohai/CONTRIBUTING.md +2 -0
  164. data/cookbooks/ohai/MAINTAINERS.md +15 -0
  165. data/cookbooks/ohai/README.md +134 -0
  166. data/cookbooks/ohai/libraries/matchers.rb +41 -0
  167. data/cookbooks/ohai/metadata.json +1 -0
  168. data/cookbooks/ohai/recipes/default.rb +20 -0
  169. data/cookbooks/ohai/resources/hint.rb +55 -0
  170. data/cookbooks/ohai/resources/plugin.rb +117 -0
  171. data/cookbooks/selinux_policy/.gitignore +51 -0
  172. data/cookbooks/selinux_policy/.kitchen.yml +25 -0
  173. data/cookbooks/selinux_policy/.rubocop.yml +2 -0
  174. data/cookbooks/selinux_policy/.travis.yml +26 -0
  175. data/cookbooks/selinux_policy/Berksfile +8 -0
  176. data/cookbooks/selinux_policy/CHANGELOG.md +155 -0
  177. data/cookbooks/selinux_policy/LICENSE +13 -0
  178. data/cookbooks/selinux_policy/README.md +217 -0
  179. data/cookbooks/selinux_policy/Rakefile +68 -0
  180. data/cookbooks/selinux_policy/TESTING.md +2 -0
  181. data/cookbooks/selinux_policy/Thorfile +12 -0
  182. data/cookbooks/selinux_policy/attributes/default.rb +5 -0
  183. data/cookbooks/selinux_policy/chefignore +102 -0
  184. data/cookbooks/selinux_policy/libraries/helper-disabled.rb +29 -0
  185. data/cookbooks/selinux_policy/libraries/matchers.rb +57 -0
  186. data/cookbooks/selinux_policy/metadata.json +58 -0
  187. data/cookbooks/selinux_policy/metadata.rb +20 -0
  188. data/cookbooks/selinux_policy/providers/boolean.rb +28 -0
  189. data/cookbooks/selinux_policy/providers/fcontext.rb +78 -0
  190. data/cookbooks/selinux_policy/providers/module.rb +81 -0
  191. data/cookbooks/selinux_policy/providers/permissive.rb +26 -0
  192. data/cookbooks/selinux_policy/providers/port.rb +58 -0
  193. data/cookbooks/selinux_policy/recipes/default.rb +9 -0
  194. data/cookbooks/selinux_policy/recipes/install.rb +32 -0
  195. data/cookbooks/selinux_policy/resources/boolean.rb +8 -0
  196. data/cookbooks/selinux_policy/resources/fcontext.rb +8 -0
  197. data/cookbooks/selinux_policy/resources/module.rb +21 -0
  198. data/cookbooks/selinux_policy/resources/permissive.rb +6 -0
  199. data/cookbooks/selinux_policy/resources/port.rb +9 -0
  200. data/cookbooks/seven_zip/CHANGELOG.md +30 -0
  201. data/cookbooks/seven_zip/README.md +108 -0
  202. data/cookbooks/seven_zip/attributes/default.rb +31 -0
  203. data/cookbooks/seven_zip/libraries/matchers.rb +33 -0
  204. data/cookbooks/seven_zip/metadata.json +1 -0
  205. data/cookbooks/seven_zip/providers/archive.rb +68 -0
  206. data/cookbooks/seven_zip/recipes/default.rb +41 -0
  207. data/cookbooks/seven_zip/resources/archive.rb +29 -0
  208. data/cookbooks/windows/.foodcritic +2 -0
  209. data/cookbooks/windows/CHANGELOG.md +528 -0
  210. data/cookbooks/windows/CONTRIBUTING.md +2 -0
  211. data/cookbooks/windows/MAINTAINERS.md +21 -0
  212. data/cookbooks/windows/README.md +803 -0
  213. data/cookbooks/windows/attributes/default.rb +21 -0
  214. data/cookbooks/windows/files/dism_features.rb +45 -0
  215. data/cookbooks/windows/libraries/matchers.rb +586 -0
  216. data/cookbooks/windows/libraries/powershell_helper.rb +53 -0
  217. data/cookbooks/windows/libraries/registry_helper.rb +356 -0
  218. data/cookbooks/windows/libraries/version.rb +207 -0
  219. data/cookbooks/windows/libraries/version_helper.rb +79 -0
  220. data/cookbooks/windows/libraries/windows_helper.rb +174 -0
  221. data/cookbooks/windows/libraries/windows_privileged.rb +103 -0
  222. data/cookbooks/windows/libraries/wmi_helper.rb +32 -0
  223. data/cookbooks/windows/metadata.json +1 -0
  224. data/cookbooks/windows/recipes/default.rb +21 -0
  225. data/cookbooks/windows/resources/auto_run.rb +46 -0
  226. data/cookbooks/windows/resources/certificate.rb +166 -0
  227. data/cookbooks/windows/resources/certificate_binding.rb +128 -0
  228. data/cookbooks/windows/resources/feature.rb +82 -0
  229. data/cookbooks/windows/resources/feature_dism.rb +108 -0
  230. data/cookbooks/windows/resources/feature_powershell.rb +70 -0
  231. data/cookbooks/windows/resources/feature_servermanagercmd.rb +76 -0
  232. data/cookbooks/windows/resources/font.rb +80 -0
  233. data/cookbooks/windows/resources/http_acl.rb +110 -0
  234. data/cookbooks/windows/resources/pagefile.rb +152 -0
  235. data/cookbooks/windows/resources/path.rb +54 -0
  236. data/cookbooks/windows/resources/printer.rb +103 -0
  237. data/cookbooks/windows/resources/printer_port.rb +101 -0
  238. data/cookbooks/windows/resources/share.rb +291 -0
  239. data/cookbooks/windows/resources/shortcut.rb +53 -0
  240. data/cookbooks/windows/resources/task.rb +384 -0
  241. data/cookbooks/windows/resources/zipfile.rb +125 -0
  242. data/cookbooks/yum/.foodcritic +1 -0
  243. data/cookbooks/yum/CHANGELOG.md +351 -0
  244. data/cookbooks/yum/CONTRIBUTING.md +2 -0
  245. data/cookbooks/yum/MAINTAINERS.md +16 -0
  246. data/cookbooks/yum/README.md +125 -0
  247. data/cookbooks/yum/attributes/main.rb +103 -0
  248. data/cookbooks/yum/libraries/matchers.rb +9 -0
  249. data/cookbooks/yum/metadata.json +1 -0
  250. data/cookbooks/yum/recipes/default.rb +26 -0
  251. data/cookbooks/yum/recipes/dnf_yum_compat.rb +29 -0
  252. data/cookbooks/yum/resources/globalconfig.rb +119 -0
  253. data/cookbooks/yum/templates/.DS_Store +0 -0
  254. data/cookbooks/yum/templates/main.erb +276 -0
  255. data/cookbooks/yum-epel/CHANGELOG.md +138 -0
  256. data/cookbooks/yum-epel/CONTRIBUTING.md +2 -0
  257. data/cookbooks/yum-epel/MAINTAINERS.md +19 -0
  258. data/cookbooks/yum-epel/README.md +172 -0
  259. data/cookbooks/yum-epel/attributes/default.rb +8 -0
  260. data/cookbooks/yum-epel/attributes/epel-debuginfo.rb +15 -0
  261. data/cookbooks/yum-epel/attributes/epel-source.rb +15 -0
  262. data/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb +15 -0
  263. data/cookbooks/yum-epel/attributes/epel-testing-source.rb +15 -0
  264. data/cookbooks/yum-epel/attributes/epel-testing.rb +15 -0
  265. data/cookbooks/yum-epel/attributes/epel.rb +21 -0
  266. data/cookbooks/yum-epel/metadata.json +1 -0
  267. data/cookbooks/yum-epel/recipes/default.rb +27 -0
  268. data/cookbooks/yum-scl/.kitchen.dokken.yml +24 -0
  269. data/cookbooks/yum-scl/.kitchen.yml +24 -0
  270. data/cookbooks/yum-scl/.rubocop.yml +6 -0
  271. data/cookbooks/yum-scl/.travis.yml +28 -0
  272. data/cookbooks/yum-scl/Berksfile +3 -0
  273. data/cookbooks/yum-scl/Berksfile.lock +25 -0
  274. data/cookbooks/yum-scl/CHANGELOG.md +11 -0
  275. data/cookbooks/yum-scl/Gemfile +46 -0
  276. data/cookbooks/yum-scl/README.md +76 -0
  277. data/cookbooks/yum-scl/attributes/centos.rb +83 -0
  278. data/cookbooks/yum-scl/attributes/default.rb +15 -0
  279. data/cookbooks/yum-scl/attributes/scientific.rb +1 -0
  280. data/cookbooks/yum-scl/files/default/RPM-GPG-KEY-CentOS-SIG-SCLo +20 -0
  281. data/cookbooks/yum-scl/libraries/yum_scl_helper.rb +33 -0
  282. data/cookbooks/yum-scl/metadata.json +42 -0
  283. data/cookbooks/yum-scl/metadata.rb +12 -0
  284. data/cookbooks/yum-scl/recipes/chef_install.rb +52 -0
  285. data/cookbooks/yum-scl/recipes/default.rb +17 -0
  286. data/cookbooks/yum-scl/recipes/native_install.rb +35 -0
  287. data/lib/vagrant-clone/command/clone.rb +66 -61
  288. data/lib/vagrant-clone/errors.rb +61 -0
  289. data/lib/vagrant-clone/util/clone_manager_base.rb +69 -0
  290. data/lib/vagrant-clone/util/clone_managers/docker.rb +31 -0
  291. data/lib/vagrant-clone/util/clone_managers/libvirt.rb +254 -0
  292. data/lib/vagrant-clone/util/vagrantfile_managers/docker.rb +154 -0
  293. data/lib/vagrant-clone/util/vagrantfile_managers/libvirt.rb +159 -0
  294. data/lib/vagrant-clone/version.rb +2 -2
  295. data/lib/vagrant-clone.rb +6 -6
  296. data/libvirt.txt +7 -0
  297. data/performance_testing.rb +165 -0
  298. data/results.txt +45 -0
  299. data/scripts/create_box.sh +134 -0
  300. data/test.rb +92 -0
  301. data/tools/create_box.sh +130 -0
  302. data/vagrant-clone.gemspec +7 -7
  303. metadata +296 -5
  304. data/lib/vagrant-clone/command/errors.rb +0 -16
  305. data/lib/vagrant-clone/command/provider/docker.rb +0 -13
  306. data/lib/vagrant-clone/utils/vagrantfile_manager.rb +0 -47
@@ -0,0 +1,292 @@
1
+ #
2
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
3
+ #
4
+ # THIS IS A FILE AUTOGENERATED BY 'rake update' DO NOT EDIT!!!!
5
+ #
6
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
7
+ #
8
+
9
+ begin
10
+ require 'chef/dsl/platform_introspection'
11
+ rescue LoadError; end
12
+
13
+ require 'chef_compat/copied_from_chef'
14
+ class Chef
15
+ module ::ChefCompat
16
+ module CopiedFromChef
17
+ #
18
+ # Author:: Adam Jacob (<adam@chef.io>)
19
+ # Copyright:: Copyright 2008-2016, Chef Software Inc.
20
+ # License:: Apache License, Version 2.0
21
+ #
22
+ # Licensed under the Apache License, Version 2.0 (the "License");
23
+ # you may not use this file except in compliance with the License.
24
+ # You may obtain a copy of the License at
25
+ #
26
+ # http://www.apache.org/licenses/LICENSE-2.0
27
+ #
28
+ # Unless required by applicable law or agreed to in writing, software
29
+ # distributed under the License is distributed on an "AS IS" BASIS,
30
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ # See the License for the specific language governing permissions and
32
+ # limitations under the License.
33
+ #
34
+
35
+ class Chef < (defined?(::Chef) ? ::Chef : Object)
36
+ module DSL
37
+ CopiedFromChef.extend_chef_module(::Chef::DSL, self) if defined?(::Chef::DSL)
38
+
39
+ # == Chef::DSL::PlatformIntrospection
40
+ # Provides the DSL for platform-dependent switch logic, such as
41
+ # #value_for_platform.
42
+ module PlatformIntrospection
43
+ CopiedFromChef.extend_chef_module(::Chef::DSL::PlatformIntrospection, self) if defined?(::Chef::DSL::PlatformIntrospection)
44
+
45
+ # Implementation class for determining platform dependent values
46
+ class PlatformDependentValue < (defined?(::Chef::DSL::PlatformIntrospection::PlatformDependentValue) ? ::Chef::DSL::PlatformIntrospection::PlatformDependentValue : Object)
47
+
48
+ # Create a platform dependent value object.
49
+ # === Arguments
50
+ # platform_hash (Hash) a hash of the same structure as Chef::Platform,
51
+ # like this:
52
+ # {
53
+ # :debian => {:default => 'the value for all debian'}
54
+ # [:centos, :redhat, :fedora] => {:default => "value for all EL variants"}
55
+ # :ubuntu => { :default => "default for ubuntu", '10.04' => "value for 10.04 only"},
56
+ # :default => "the default when nothing else matches"
57
+ # }
58
+ # * platforms can be specified as Symbols or Strings
59
+ # * multiple platforms can be grouped by using an Array as the key
60
+ # * values for platforms need to be Hashes of the form:
61
+ # {platform_version => value_for_that_version}
62
+ # * the exception to the above is the default value, which is given as
63
+ # :default => default_value
64
+ def initialize(platform_hash)
65
+ super if defined?(::Chef::DSL::PlatformIntrospection::PlatformDependentValue)
66
+ @values = {}
67
+ platform_hash.each { |platforms, value| set(platforms, value) }
68
+ end
69
+
70
+ def value_for_node(node)
71
+ platform, version = node[:platform].to_s, node[:platform_version].to_s
72
+ # Check if we match a version constraint via Chef::VersionConstraint::Platform and Chef::Version::Platform
73
+ matched_value = match_versions(node)
74
+ if @values.key?(platform) && @values[platform].key?(version)
75
+ @values[platform][version]
76
+ elsif matched_value
77
+ matched_value
78
+ elsif @values.key?(platform) && @values[platform].key?("default")
79
+ @values[platform]["default"]
80
+ elsif @values.key?("default")
81
+ @values["default"]
82
+ else
83
+ nil
84
+ end
85
+ end
86
+
87
+ private
88
+
89
+ def match_versions(node)
90
+ begin
91
+ platform, version = node[:platform].to_s, node[:platform_version].to_s
92
+ return nil unless @values.key?(platform)
93
+ node_version = Chef::Version::Platform.new(version)
94
+ key_matches = []
95
+ keys = @values[platform].keys
96
+ keys.each do |k|
97
+ begin
98
+ if Chef::VersionConstraint::Platform.new(k).include?(node_version)
99
+ key_matches << k
100
+ end
101
+ rescue Chef::Exceptions::InvalidVersionConstraint => e
102
+ Chef::Log.debug "Caught InvalidVersionConstraint. This means that a key in value_for_platform cannot be interpreted as a Chef::VersionConstraint::Platform."
103
+ Chef::Log.debug(e)
104
+ end
105
+ end
106
+ return @values[platform][version] if key_matches.include?(version)
107
+ case key_matches.length
108
+ when 0
109
+ return nil
110
+ when 1
111
+ return @values[platform][key_matches.first]
112
+ else
113
+ raise "Multiple matches detected for #{platform} with values #{@values}. The matches are: #{key_matches}"
114
+ end
115
+ rescue Chef::Exceptions::InvalidCookbookVersion => e
116
+ # Lets not break because someone passes a weird string like 'default' :)
117
+ Chef::Log.debug(e)
118
+ Chef::Log.debug "InvalidCookbookVersion exceptions are common and expected here: the generic constraint matcher attempted to match something which is not a constraint. Moving on to next version or constraint"
119
+ return nil
120
+ rescue Chef::Exceptions::InvalidPlatformVersion => e
121
+ Chef::Log.debug "Caught InvalidPlatformVersion, this means that Chef::Version::Platform does not know how to turn #{node_version} into an x.y.z format"
122
+ Chef::Log.debug(e)
123
+ return nil
124
+ end
125
+ end
126
+
127
+ def set(platforms, value)
128
+ if platforms.to_s == "default"
129
+ @values["default"] = value
130
+ else
131
+ assert_valid_platform_values!(platforms, value)
132
+ Array(platforms).each { |platform| @values[platform.to_s] = normalize_keys(value) }
133
+ value
134
+ end
135
+ end
136
+
137
+ def normalize_keys(hash)
138
+ hash.inject({}) do |h, key_value|
139
+ keys, value = *key_value
140
+ Array(keys).each do |key|
141
+ h[key.to_s] = value
142
+ end
143
+ h
144
+ end
145
+ end
146
+
147
+ def assert_valid_platform_values!(platforms, value)
148
+ unless value.kind_of?(Hash)
149
+ msg = "platform dependent values must be specified in the format :platform => {:version => value} "
150
+ msg << "you gave a value #{value.inspect} for platform(s) #{platforms}"
151
+ raise ArgumentError, msg
152
+ end
153
+ end
154
+ end
155
+
156
+ # Given a hash similar to the one we use for Platforms, select a value from the hash. Supports
157
+ # per platform defaults, along with a single base default. Arrays may be passed as hash keys and
158
+ # will be expanded.
159
+ #
160
+ # === Parameters
161
+ # platform_hash:: A platform-style hash.
162
+ #
163
+ # === Returns
164
+ # value:: Whatever the most specific value of the hash is.
165
+ def value_for_platform(platform_hash)
166
+ PlatformDependentValue.new(platform_hash).value_for_node(node)
167
+ end
168
+
169
+ # Given a list of platforms, returns true if the current recipe is being run on a node with
170
+ # that platform, false otherwise.
171
+ #
172
+ # === Parameters
173
+ # args:: A list of platforms. Each platform can be in string or symbol format.
174
+ #
175
+ # === Returns
176
+ # true:: If the current platform is in the list
177
+ # false:: If the current platform is not in the list
178
+ def platform?(*args)
179
+ has_platform = false
180
+
181
+ args.flatten.each do |platform|
182
+ has_platform = true if platform.to_s == node[:platform]
183
+ end
184
+
185
+ has_platform
186
+ end
187
+
188
+ # Implementation class for determining platform family dependent values
189
+ class PlatformFamilyDependentValue < (defined?(::Chef::DSL::PlatformIntrospection::PlatformFamilyDependentValue) ? ::Chef::DSL::PlatformIntrospection::PlatformFamilyDependentValue : Object)
190
+
191
+ # Create a platform family dependent value object.
192
+ # === Arguments
193
+ # platform_family_hash (Hash) a map of platform families to values.
194
+ # like this:
195
+ # {
196
+ # :rhel => "value for all EL variants"
197
+ # :fedora => "value for fedora variants fedora and amazon" ,
198
+ # [:fedora, :rhel] => "value for all known redhat variants"
199
+ # :debian => "value for debian variants including debian, ubuntu, mint" ,
200
+ # :default => "the default when nothing else matches"
201
+ # }
202
+ # * platform families can be specified as Symbols or Strings
203
+ # * multiple platform families can be grouped by using an Array as the key
204
+ # * values for platform families can be any object, with no restrictions. Some examples:
205
+ # - [:stop, :start]
206
+ # - "mysql-devel"
207
+ # - { :key => "value" }
208
+ def initialize(platform_family_hash)
209
+ super if defined?(::Chef::DSL::PlatformIntrospection::PlatformFamilyDependentValue)
210
+ @values = {}
211
+ @values["default"] = nil
212
+ platform_family_hash.each { |platform_families, value| set(platform_families, value) }
213
+ end
214
+
215
+ def value_for_node(node)
216
+ if node.key?(:platform_family)
217
+ platform_family = node[:platform_family].to_s
218
+ if @values.key?(platform_family)
219
+ @values[platform_family]
220
+ else
221
+ @values["default"]
222
+ end
223
+ else
224
+ @values["default"]
225
+ end
226
+ end
227
+
228
+ private
229
+
230
+ def set(platform_family, value)
231
+ if platform_family.to_s == "default"
232
+ @values["default"] = value
233
+ else
234
+ Array(platform_family).each { |family| @values[family.to_s] = value }
235
+ value
236
+ end
237
+ end
238
+ end
239
+
240
+ # Given a hash mapping platform families to values, select a value from the hash. Supports a single
241
+ # base default if platform family is not in the map. Arrays may be passed as hash keys and will be
242
+ # expanded
243
+ #
244
+ # === Parameters
245
+ # platform_family_hash:: A hash in the form { platform_family_name => value }
246
+ #
247
+ # === Returns
248
+ # value:: Whatever the most specific value of the hash is.
249
+ def value_for_platform_family(platform_family_hash)
250
+ PlatformFamilyDependentValue.new(platform_family_hash).value_for_node(node)
251
+ end
252
+
253
+ # Given a list of platform families, returns true if the current recipe is being run on a
254
+ # node within that platform family, false otherwise.
255
+ #
256
+ # === Parameters
257
+ # args:: A list of platform families. Each platform family can be in string or symbol format.
258
+ #
259
+ # === Returns
260
+ # true:: if the current node platform family is in the list.
261
+ # false:: if the current node platform family is not in the list.
262
+ def platform_family?(*args)
263
+ args.flatten.any? do |platform_family|
264
+ platform_family.to_s == node[:platform_family]
265
+ end
266
+ end
267
+
268
+ # Shamelessly stolen from https://github.com/sethvargo/chef-sugar/blob/master/lib/chef/sugar/docker.rb
269
+ # Given a node object, returns whether the node is a docker container.
270
+ #
271
+ # === Parameters
272
+ # node:: [Chef::Node] The node to check.
273
+ #
274
+ # === Returns
275
+ # true:: if the current node is a docker container
276
+ # false:: if the current node is not a docker container
277
+ def docker?(node = run_context.nil? ? nil : run_context.node)
278
+ # Using "File.exist?('/.dockerinit') || File.exist?('/.dockerenv')" makes Travis sad,
279
+ # and that makes us sad too.
280
+ node && node[:virtualization] && node[:virtualization][:systems] &&
281
+ node[:virtualization][:systems][:docker] && node[:virtualization][:systems][:docker] == "guest"
282
+ end
283
+
284
+ end
285
+ end
286
+ end
287
+
288
+ # **DEPRECATED**
289
+ # This used to be part of chef/mixin/language. Load the file to activate the deprecation code.
290
+ end
291
+ end
292
+ end
@@ -0,0 +1,37 @@
1
+ #
2
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
3
+ #
4
+ # THIS IS A FILE AUTOGENERATED BY 'rake update' DO NOT EDIT!!!!
5
+ #
6
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
7
+ #
8
+
9
+ begin
10
+ require 'chef/dsl/recipe'
11
+ rescue LoadError; end
12
+
13
+ require 'chef_compat/copied_from_chef'
14
+ class Chef
15
+ module ::ChefCompat
16
+ module CopiedFromChef
17
+ require "chef_compat/copied_from_chef/chef/dsl/core"
18
+ require "chef_compat/copied_from_chef/chef/mixin/lazy_module_include"
19
+ class Chef < (defined?(::Chef) ? ::Chef : Object)
20
+ module DSL
21
+ CopiedFromChef.extend_chef_module(::Chef::DSL, self) if defined?(::Chef::DSL)
22
+ module Recipe
23
+ CopiedFromChef.extend_chef_module(::Chef::DSL::Recipe, self) if defined?(::Chef::DSL::Recipe)
24
+ include Chef::DSL::Core
25
+ extend Chef::Mixin::LazyModuleInclude
26
+ module FullDSL
27
+ CopiedFromChef.extend_chef_module(::Chef::DSL::Recipe::FullDSL, self) if defined?(::Chef::DSL::Recipe::FullDSL)
28
+ include Chef::DSL::Recipe
29
+ extend Chef::Mixin::LazyModuleInclude
30
+ end
31
+ end
32
+ end
33
+ end
34
+ require "chef_compat/copied_from_chef/chef/resource"
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,70 @@
1
+ #
2
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
3
+ #
4
+ # THIS IS A FILE AUTOGENERATED BY 'rake update' DO NOT EDIT!!!!
5
+ #
6
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
7
+ #
8
+
9
+ begin
10
+ require 'chef/dsl/universal'
11
+ rescue LoadError; end
12
+
13
+ require 'chef_compat/copied_from_chef'
14
+ class Chef
15
+ module ::ChefCompat
16
+ module CopiedFromChef
17
+ #--
18
+ # Author:: Adam Jacob (<adam@chef.io>)
19
+ # Author:: Christopher Walters (<cw@chef.io>)
20
+ # Copyright:: Copyright 2008-2016 Chef Software, Inc.
21
+ # License:: Apache License, Version 2.0
22
+ #
23
+ # Licensed under the Apache License, Version 2.0 (the "License");
24
+ # you may not use this file except in compliance with the License.
25
+ # You may obtain a copy of the License at
26
+ #
27
+ # http://www.apache.org/licenses/LICENSE-2.0
28
+ #
29
+ # Unless required by applicable law or agreed to in writing, software
30
+ # distributed under the License is distributed on an "AS IS" BASIS,
31
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ # See the License for the specific language governing permissions and
33
+ # limitations under the License.
34
+ #
35
+
36
+ require "chef_compat/copied_from_chef/chef/dsl/platform_introspection"
37
+ require "chef_compat/copied_from_chef/chef/mixin/powershell_out"
38
+
39
+ class Chef < (defined?(::Chef) ? ::Chef : Object)
40
+ module DSL
41
+ CopiedFromChef.extend_chef_module(::Chef::DSL, self) if defined?(::Chef::DSL)
42
+ # Part of a family of DSL mixins.
43
+ #
44
+ # Chef::DSL::Recipe mixes into Recipes and LWRP Providers.
45
+ # - this does not target core chef resources and providers.
46
+ # - this is restricted to recipe/resource/provider context where a resource collection exists.
47
+ # - cookbook authors should typically include modules into here.
48
+ #
49
+ # Chef::DSL::Core mixes into Recipes, LWRP Providers and Core Providers
50
+ # - this adds cores providers on top of the Recipe DSL.
51
+ # - this is restricted to recipe/resource/provider context where a resource collection exists.
52
+ # - core chef authors should typically include modules into here.
53
+ #
54
+ # Chef::DSL::Universal mixes into Recipes, LWRP Resources+Providers, Core Resources+Providers, and Attributes files.
55
+ # - this adds resources and attributes files.
56
+ # - do not add helpers which manipulate the resource collection.
57
+ # - this is for general-purpose stuff that is useful nearly everywhere.
58
+ # - it also pollutes the namespace of nearly every context, watch out.
59
+ #
60
+ module Universal
61
+ CopiedFromChef.extend_chef_module(::Chef::DSL::Universal, self) if defined?(::Chef::DSL::Universal)
62
+ include Chef::DSL::PlatformIntrospection
63
+ include Chef::Mixin::PowershellOut
64
+ include Chef::Mixin::ShellOut
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,98 @@
1
+ #
2
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
3
+ #
4
+ # THIS IS A FILE AUTOGENERATED BY 'rake update' DO NOT EDIT!!!!
5
+ #
6
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
7
+ #
8
+
9
+ begin
10
+ require 'chef/mixin/lazy_module_include'
11
+ rescue LoadError; end
12
+
13
+ require 'chef_compat/copied_from_chef'
14
+ class Chef
15
+ module ::ChefCompat
16
+ module CopiedFromChef
17
+ #
18
+ # Copyright:: Copyright 2011-2016, Chef Software Inc.
19
+ # License:: Apache License, Version 2.0
20
+ #
21
+ # Licensed under the Apache License, Version 2.0 (the "License");
22
+ # you may not use this file except in compliance with the License.
23
+ # You may obtain a copy of the License at
24
+ #
25
+ # http://www.apache.org/licenses/LICENSE-2.0
26
+ #
27
+ # Unless required by applicable law or agreed to in writing, software
28
+ # distributed under the License is distributed on an "AS IS" BASIS,
29
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
30
+ # See the License for the specific language governing permissions and
31
+ # limitations under the License.
32
+ #
33
+
34
+ class Chef < (defined?(::Chef) ? ::Chef : Object)
35
+ module Mixin
36
+ CopiedFromChef.extend_chef_module(::Chef::Mixin, self) if defined?(::Chef::Mixin)
37
+ # If you have:
38
+ #
39
+ # module A
40
+ # extend LazyModuleInclude
41
+ # end
42
+ #
43
+ # module B
44
+ # include A
45
+ # end
46
+ #
47
+ # module C
48
+ # include B
49
+ # end
50
+ #
51
+ # module Monkeypatches
52
+ # def monkey
53
+ # puts "monkey!"
54
+ # end
55
+ # end
56
+ #
57
+ # A.send(:include, Monkeypatches)
58
+ #
59
+ # Then B and C and any classes that they're included in will also get the #monkey method patched into them.
60
+ #
61
+ module LazyModuleInclude
62
+ CopiedFromChef.extend_chef_module(::Chef::Mixin::LazyModuleInclude, self) if defined?(::Chef::Mixin::LazyModuleInclude)
63
+
64
+ # Most of the magick is in this hook which creates a closure over the parent class and then builds an
65
+ # "infector" module which infects all descendants and which is responsible for updating the list of
66
+ # descendants in the parent class.
67
+ def included(klass)
68
+ super
69
+ parent_klass = self
70
+ infector = Module.new do
71
+ define_method(:included) do |subklass|
72
+ super(subklass)
73
+ subklass.extend(infector)
74
+ parent_klass.descendants.push(subklass)
75
+ end
76
+ end
77
+ klass.extend(infector)
78
+ parent_klass.descendants.push(klass)
79
+ end
80
+
81
+ def descendants
82
+ @descendants ||= []
83
+ end
84
+
85
+ def include(*classes)
86
+ super
87
+ classes.each do |klass|
88
+ descendants.each do |descendant|
89
+ descendant.send(:include, klass)
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
95
+ end
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,74 @@
1
+ #
2
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
3
+ #
4
+ # THIS IS A FILE AUTOGENERATED BY 'rake update' DO NOT EDIT!!!!
5
+ #
6
+ # NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE
7
+ #
8
+
9
+ begin
10
+ require 'chef/mixin/notifying_block'
11
+ rescue LoadError; end
12
+
13
+ require 'chef_compat/copied_from_chef'
14
+ class Chef
15
+ module ::ChefCompat
16
+ module CopiedFromChef
17
+ #--
18
+ # Author:: Lamont Granquist <lamont@chef.io>
19
+ # Copyright:: Copyright 2010-2016, Chef Software Inc.
20
+ # License:: Apache License, Version 2.0
21
+ #
22
+ # Licensed under the Apache License, Version 2.0 (the "License");
23
+ # you may not use this file except in compliance with the License.
24
+ # You may obtain a copy of the License at
25
+ #
26
+ # http://www.apache.org/licenses/LICENSE-2.0
27
+ #
28
+ # Unless required by applicable law or agreed to in writing, software
29
+ # distributed under the License is distributed on an "AS IS" BASIS,
30
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31
+ # See the License for the specific language governing permissions and
32
+ # limitations under the License.
33
+
34
+ class Chef < (defined?(::Chef) ? ::Chef : Object)
35
+ module Mixin
36
+ CopiedFromChef.extend_chef_module(::Chef::Mixin, self) if defined?(::Chef::Mixin)
37
+ module NotifyingBlock
38
+ CopiedFromChef.extend_chef_module(::Chef::Mixin::NotifyingBlock, self) if defined?(::Chef::Mixin::NotifyingBlock)
39
+
40
+ def notifying_block(&block)
41
+ begin
42
+ subcontext = subcontext_block(&block)
43
+ Chef::Runner.new(subcontext).converge
44
+ ensure
45
+ # recipes don't have a new_resource
46
+ if respond_to?(:new_resource)
47
+ if subcontext && subcontext.resource_collection.any?(&:updated?)
48
+ new_resource.updated_by_last_action(true)
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ def subcontext_block(parent_context = nil, &block)
55
+ parent_context ||= @run_context
56
+ sub_run_context = parent_context.create_child
57
+
58
+ begin
59
+ outer_run_context = @run_context
60
+ @run_context = sub_run_context
61
+ instance_eval(&block)
62
+ ensure
63
+ @run_context = outer_run_context
64
+ end
65
+
66
+ sub_run_context
67
+ end
68
+
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end