{"id":15022246,"url":"https://github.com/jantman/vagrant-r10k","last_synced_at":"2025-06-14T05:05:01.631Z","repository":{"id":18174216,"uuid":"21286195","full_name":"jantman/vagrant-r10k","owner":"jantman","description":"UNSUPPORTED - SEEKING MAINTAINER - Vagrant middleware plugin to retrieve puppet modules using r10k.","archived":false,"fork":false,"pushed_at":"2017-05-28T13:37:10.000Z","size":159,"stargazers_count":35,"open_issues_count":1,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-14T05:04:54.598Z","etag":null,"topics":["puppet","r10k","ruby","vagrant","vagrantfile"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jantman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-27T19:03:26.000Z","updated_at":"2023-09-08T16:48:33.000Z","dependencies_parsed_at":"2022-09-13T20:10:56.066Z","dependency_job_id":null,"html_url":"https://github.com/jantman/vagrant-r10k","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/jantman/vagrant-r10k","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantman%2Fvagrant-r10k","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantman%2Fvagrant-r10k/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantman%2Fvagrant-r10k/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantman%2Fvagrant-r10k/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jantman","download_url":"https://codeload.github.com/jantman/vagrant-r10k/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jantman%2Fvagrant-r10k/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259763077,"owners_count":22907408,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["puppet","r10k","ruby","vagrant","vagrantfile"],"created_at":"2024-09-24T19:57:41.607Z","updated_at":"2025-06-14T05:05:01.615Z","avatar_url":"https://github.com/jantman.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vagrant::R10k\n\n[![Build Status](https://travis-ci.org/jantman/vagrant-r10k.svg?branch=master)](https://travis-ci.org/jantman/vagrant-r10k)\n[![Code Coverage](https://codecov.io/github/jantman/vagrant-r10k/coverage.svg?branch=master)](https://codecov.io/github/jantman/vagrant-r10k?branch=master)\n[![Code Climate](https://codeclimate.com/github/jantman/vagrant-r10k/badges/gpa.svg)](https://codeclimate.com/github/jantman/vagrant-r10k)\n[![Gem Version](https://img.shields.io/gem/v/vagrant-r10k.svg)](https://rubygems.org/gems/vagrant-r10k)\n[![Total Downloads](https://img.shields.io/gem/dt/vagrant-r10k.svg)](https://rubygems.org/gems/vagrant-r10k)\n[![Github Issues](https://img.shields.io/github/issues/jantman/vagrant-r10k.svg)](https://github.com/jantman/vagrant-r10k/issues)\n[![Project Status: Unsupported – The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired.](http://www.repostatus.org/badges/2.0.0/unsupported.svg)](http://www.repostatus.org/#unsupported)\n\nvagrant-r10k is a [Vagrant](http://www.vagrantup.com/) 1.2+ middleware plugin to allow you to have just a Puppetfile and\nmanifests in your vagrant project, and pull in the required modules via [r10k](https://github.com/adrienthebo/r10k). This\nplugin only works with the 'puppet' provisioner, not a puppet server. It expects you to have a Puppetfile in the same repository\nas your Vagrantfile.\n\n__Important Note:__ I no longer use this project anywhere, and am no longer able to maintain it. If anyone is interested in taking over as maintainer, please contact me.\n\n## Installation\n\n    $ vagrant plugin install vagrant-r10k\n\n__Note__ that if you include modules from a (the) forge in your Puppetfile, i.e. in the format\n\n    mod 'username/modulename'\n\ninstead of just git references, you will need the ``puppet`` rubygem installed and available. It\nis not included in the Gemfile so that users who only use git references won't have a new/possibly\nconflicting Puppet installation.\n\n## Usage\n\nAdd the following to your Vagrantfile, before the puppet section:\n\n    config.r10k.puppet_dir = 'dir' # the parent directory that contains your module directory and Puppetfile\n    config.r10k.puppetfile_path = 'dir/Puppetfile' # the path to your Puppetfile, within the repo\n\nFor the following example directory structure:\n\n    .\n    ├── README.md\n    ├── Vagrantfile\n    ├── docs\n    │   └── foo.md\n    ├── puppet\n    │   ├── Puppetfile\n    │   ├── manifests\n    │   │   └── default.pp\n    │   └── modules\n    └── someproject\n        └── foo.something\n\nThe configuration for r10k and puppet would look like:\n\n    # r10k plugin to deploy puppet modules\n    config.r10k.puppet_dir = \"puppet\"\n    config.r10k.puppetfile_path = \"puppet/Puppetfile\"\n    \n    # Provision the machine with the appliction\n    config.vm.provision \"puppet\" do |puppet|\n      puppet.manifests_path = \"puppet/manifests\"\n      puppet.manifest_file  = \"default.pp\"\n      puppet.module_path = \"puppet/modules\"\n    end\n\nIf you provide an array of directories in puppet.module_path, vagrant-r10k will use the first directory listed for auto configuration. If you want to let r10k use a different directory, see below.\n\n### Puppet Forge Modules in Puppetfile\n\nIn order to prevent conflicts with other plugins and allow you to use whatever Puppet version you need, ``puppet`` itself is not included\nin this plugin. This means that, _as-is, this plugin can't install Forge modules in your Puppetfile_, only modules from Git or SVN. This\nis because installing Forge modules requires ``puppet`` itself to download the module.\n\nThe two possible ways to deal with this are:\n\n1. Only use git or svn repo references in your Puppetfile.\n2. Install ``puppet`` into Vagrant's gems\n\nFor #2, installing puppet into Vagrant's gems, simply ``vagrant plugin install puppet``; for further information,\nsee the [vagrant plugin documentation](https://docs.vagrantup.com/v2/plugins/usage.html). If you do this, you should\nprobably ensure that puppet is present by putting something like this at the top of your Vagrantfile:\n\n```\n# test that puppet is installed as a Vagrant plugin\n# you can't use ``Vagrant.has_plugin?(\"puppet\")`` because Vagrant's built-in\n# Puppet Provisioner provides a plugin named \"puppet\", so this always evaluates to true.\nbegin\n  gem \"puppet\"\nrescue Gem::LoadError\n  raise \"puppet is not installed in vagrant gems! please run 'vagrant plugin install puppet'\"\nend\n```\n\nIf you want to check for a specific version of Puppet, you can replace the content of the ``begin`` block with something like:\n\n```\n  gem \"puppet\", \"\u003e=3.8\"\n```\n\n### Usage with explicit path to module installation directory\n\nAdd the following to your Vagrantfile, before the puppet section:\n\n    config.r10k.puppet_dir = 'dir' # the parent directory that contains your module directory and Puppetfile\n    config.r10k.puppetfile_path = 'dir/Puppetfile' # the path to your Puppetfile, within the repo\n    config.r10k.module_path = 'dir/moduledir' # the path where r10k should install its modules (should be same / one of those in puppet provisioner, will be checked)\n\nFor the following example directory structure:\n\n    .\n    ├── README.md\n    ├── Vagrantfile\n    ├── docs\n    │   └── foo.md\n    ├── puppet\n    │   ├── Puppetfile\n    │   ├── manifests\n    │   │   └── default.pp\n    │   ├── modules # your own modules\n    │   └── vendor # modules installed by r10k\n    └── someproject\n\t└── foo.something\n\nThe configuration for r10k and puppet would look like:\n\n    # r10k plugin to deploy puppet modules\n    config.r10k.puppet_dir = \"puppet\"\n    config.r10k.puppetfile_path = \"puppet/Puppetfile\"\n    config.r10k.module_path = \"puppet/vendor\"\n    \n    # Provision the machine with the appliction\n    config.vm.provision \"puppet\" do |puppet|\n      puppet.manifests_path = \"puppet/manifests\"\n      puppet.manifest_file  = \"default.pp\"\n      puppet.module_path = [\"puppet/modules\", \"puppet/vendor\"]\n    end\n\n### Usage With Puppet4 Environment-Based Provisioner\n\nPuppet4 discontinues use of the ``manifest_file`` and ``manifests_path`` parameters, and also makes the ``module_path`` parameter optional\nfor Puppet. In cases where only ``environment`` and ``environment_path`` are specified, ``module_path`` will be parsed from the environment's\n``environment.conf``.\n\nvagrant-r10k does not handle parsing ``environment.conf``; you __must__ still specify the ``module_path`` for r10k to deploy modules into.\n\nHere is an example Vagrantfile (taken from vagrant-r10k's [acceptance tests](https://github.com/jantman/vagrant-r10k/blob/master/spec/acceptance/skeletons/puppet4/Vagrantfile))\nfor use with environment-based configuration. Note that ``config.r10k.module_path`` is still specified. You can see the directory structure of this example\n[here](https://github.com/jantman/vagrant-r10k/tree/master/spec/acceptance/skeletons/puppet4).\n\n```\nVagrant.configure(\"2\") do |config|\n  config.vm.box = \"vagrantr10kspec\"\n  config.vm.network \"private_network\", type: \"dhcp\"\n\n  # r10k plugin to deploy puppet modules\n  config.r10k.puppet_dir = \"environments/myenv\"\n  config.r10k.puppetfile_path = \"environments/myenv/Puppetfile\"\n  config.r10k.module_path = \"environments/myenv/modules\"\n\n  # Provision the machine with the appliction\n  config.vm.provision \"puppet\" do |puppet|\n    puppet.environment = \"myenv\"\n    puppet.environment_path  = \"environments\"\n  end\nend\n```\n\n## Getting Help\n\nBug reports, feature requests, and pull requests are always welcome. At this time, the\n[GitHub Issues Tracker](https://github.com/jantman/vagrant-r10k/issues)\nis the only place for support, so questions and comments are welcome there as well,\nbut please be sure they haven't already been asked and answered.\n\nBug reports should include the following information in order to be investigated:\n\n1. A detailed description of the problem, including the behavior you expected and\n   the actual behavior that you're observing.\n2. The output of ``vagrant plugin list`` showing all of the plugins you're running\n   and their versions.\n3. The versions of Ruby (``ruby --version``) and Vagrant (``vagrant --version``)\n   itself that you're running.\n4. A copy of the Vagrantfile that was being used. Please include all lines in it;\n   if you have any confidential or proprietary information, feel free to replace\n   usernames, passwords, URLs, IPs, etc. with \"X\"s, but please don't remove\n   large portions of it.\n5. A debug-level log of the command you're having problems with. i.e. if your\n   problem is experienced when running ``vagrant up``, please include the full\n   output of ``VAGRANT_LOG=debug vagrant up``.\n\n## Contributing\n\n1. Fork it ( https://github.com/jantman/vagrant-r10k/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Add yourself to the \"Contributors\" list below.\n5. Push to the branch (`git push origin my-new-feature`)\n6. Create a new Pull Request\n\n### Contributors\n\n* Oliver Bertuch - [https://github.com/poikilotherm](https://github.com/poikilotherm)\n\n## Development\n\n__Note__ that developing vagrant plugins _requires_ ruby 2.0.0 or newer.\nA `.ruby-version` is provided to get [rvm](https://rvm.io/workflow/projects)\nto use 2.1.1.\n\n### Unit Tests\n\nThese will be automatically run by TravisCI for any pull requests or commits\nto the repository. To run manually:\n\n    bundle install --path vendor\n    bundle exec rake spec\n\n### Acceptance Tests\n\nUnfortunately, \"acceptance\" testing Vagrant requires the various providers\nbe functional; i.e. to test the [VMWare Providers](https://www.vagrantup.com/vmware)\nrequires both a license for them from Hashicorp, and the VMWare products\nthemselves. Similarly, testing the AWS providers requires an AWS account and\nactually running EC2 instances. As such, acceptance tests are provided separately\nfor each provider.\n\nNote that the acceptance tests are tested with bundler 1.7.14. Also note that\nthe first time the VMWare provider is run in a given installation, it will\npresent an interactive sudo prompt in order to be able to interact with\nVMWare.\n\nRunning Virtualbox acceptance tests:\n\n    bundle exec rake acceptance:virtualbox\n\nWhen tests fail, they leave Virtualbox ``hostonlyif``s around; this can quickly clutter up the\nsystem and cause other problems. As a result, after the virtualbox tests, we invoke the Vagrant\nVirtualBox Provider's [delete_unused_host_only_networks](https://github.com/mitchellh/vagrant/blob/b118ab10c8e0f8e62a547249805f05240e6e4ee9/plugins/providers/virtualbox/driver/version_5_0.rb#L69)\nmethod. This can also be manually run via ``bundle exec rake clean_vbox``.\n\nThese tests may generate a _lot_ of output; since there's no nice standalone junit XML viewer,\nit may be helpful to run the tests as:\n\n    bundle exec rake acceptance:virtualbox 2\u003e\u00261 | tee acceptance.out\n\nAnd then examine ``acceptance.out`` as needed.\n\n\n__Note__ that the vmware-workstation provider acceptance tests are not currently\nfunctional; I've only been able to get the VirtualBox acceptance tests working.\nIf many users report vmware-specific problems, I'll give the tests another try.\nHelpful information for them is available at http://www.codingonstilts.com/2013/07/how-to-bundle-exec-vagrant-up-with.html\nand https://groups.google.com/d/topic/vagrant-up/J8J6LmhzBqM/discussion\nI had these working at some point, but have been unable to get them working since;\nit seems that (a bit painfully and ironically), mitchellh's [vagrant-spec](https://github.com/mitchellh/vagrant-spec/)\ndoesn't seem to work cleanly with Hashicorp's paid/licensed Vagrant providers.\n\nRunning (currently broken) VMWare Workstation acceptance tests:\n\n    bundle exec rake acceptance:vmware_workstation\n\n### Manually Testing Vagrant\n\nFor manual testing:\n\n    bundle install --path vendor\n\tVAGRANT_LOG=debug bundle exec vagrant up\n\nTo use an existing project's Vagrantfile, you can just specify the directory that the Vagrantfile\nis in using the ``VAGRANT_CWD`` environment variable (i.e. prepend ``VAGRANT_CWD=/path/to/project``\nto the above command).\n\nNote that this will not work easily with the VMWare provider, or any other Hashicorp paid/licensed provider.\n\n### Debugging\n\nExporting ``VAGRANT_LOG=debug`` will also turn on debug-level logging for r10k.\n\n### Releasing\n\n1. Ensure all tests are passing, coverage is acceptable, etc.\n2. Increment the version number in ``lib/vagrant-r10k/version.rb``\n3. Update CHANGES.md\n4. Push those changes to origin.\n5. ``bundle exec rake build``\n6. ``bundle exec rake release``\n\n## Acknowlegements\n\nThanks to the following people:\n\n* [@adrienthebo](https://github.com/adrienthebo) for [r10k](https://github.com/adrienthebo/r10k) and for [vagrant-pe_build](https://github.com/adrienthebo/vagrant-pe_build) as a wonderful example of unit testing Vagrant plugins.\n* [@garethr](https://github.com/garethr) for [librarian-puppet-vagrant](https://github.com/garethr/librarian-puppet-vagrant) which inspired this plugin\n* [Alex Kahn](http://akahn.net/) of Paperless Post for his [How to Write a Vagrant Middleware](http://akahn.net/2014/05/05/vagrant-middleware.html) blog post, documenting the new middleware API\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjantman%2Fvagrant-r10k","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjantman%2Fvagrant-r10k","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjantman%2Fvagrant-r10k/lists"}