├── .gitignore
├── .travis.yml
├── Gemfile
├── Gemfile.lock
├── LICENSE.txt
├── README.md
├── Rakefile
├── Vagrantfile
├── lib
├── vagrant-butcher.rb
└── vagrant-butcher
│ ├── action.rb
│ ├── action
│ ├── cleanup.rb
│ └── copy_guest_key.rb
│ ├── config.rb
│ ├── errors.rb
│ ├── helpers.rb
│ ├── helpers
│ ├── action.rb
│ ├── config.rb
│ ├── connection.rb
│ ├── guest.rb
│ └── key_files.rb
│ ├── plugin.rb
│ └── version.rb
├── spec
├── spec_helper.rb
└── unit
│ ├── vagrant_butcher
│ └── config_spec.rb
│ └── vagrant_butcher_spec.rb
└── vagrant-butcher.gemspec
/.gitignore:
--------------------------------------------------------------------------------
1 | *.gem
2 | *.rbc
3 | .bundle
4 | .config
5 | .yardoc
6 | InstalledFiles
7 | _yardoc
8 | coverage
9 | doc/
10 | lib/bundler/man
11 | pkg
12 | rdoc
13 | spec/reports
14 | test/tmp
15 | test/version_tmp
16 | tmp
17 | .idea/
18 | .vagrant/
19 | .vagrant-butcher/
20 | *.sublime-*
21 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: ruby
2 | rvm:
3 | - 2.5.3
4 | script: bundle exec rspec spec/
5 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | group :development do
4 | # We depend on Vagrant for development, but we don't add it as a
5 | # gem dependency because we expect to be installed within the
6 | # Vagrant environment itself using `vagrant plugin`.
7 | gem "vagrant", :git => 'https://github.com/mitchellh/vagrant.git'
8 | end
9 |
10 | group :plugins do
11 | gemspec
12 | end
13 |
--------------------------------------------------------------------------------
/Gemfile.lock:
--------------------------------------------------------------------------------
1 | GIT
2 | remote: https://github.com/mitchellh/vagrant.git
3 | revision: 4ce8d84f7e6709e4478612a9f0810dc686076ee0
4 | specs:
5 | vagrant (2.2.6.dev)
6 | bcrypt_pbkdf (~> 1.0.0)
7 | childprocess (~> 0.6.0)
8 | ed25519 (~> 1.2.4)
9 | erubis (~> 2.7.0)
10 | hashicorp-checkpoint (~> 0.1.5)
11 | i18n (~> 1.1.1)
12 | listen (~> 3.1.5)
13 | log4r (~> 1.1.9, < 1.1.11)
14 | net-scp (~> 1.2.0)
15 | net-sftp (~> 2.1)
16 | net-ssh (~> 5.1.0)
17 | rb-kqueue (~> 0.2.0)
18 | rest-client (>= 1.6.0, < 3.0)
19 | ruby_dep (<= 1.3.1)
20 | rubyzip (~> 1.2.2)
21 | vagrant_cloud (~> 2.0.2)
22 | wdm (~> 0.1.0)
23 | winrm (~> 2.1)
24 | winrm-elevated (~> 1.1)
25 | winrm-fs (~> 1.0)
26 |
27 | PATH
28 | remote: .
29 | specs:
30 | vagrant-butcher (2.3.2.pre)
31 | ridley (~> 5.1)
32 |
33 | GEM
34 | remote: https://rubygems.org/
35 | specs:
36 | addressable (2.6.0)
37 | public_suffix (>= 2.0.2, < 4.0)
38 | bcrypt_pbkdf (1.0.1)
39 | buff-config (2.0.0)
40 | buff-extensions (~> 2.0)
41 | varia_model (~> 0.6)
42 | buff-extensions (2.0.0)
43 | buff-ignore (1.2.0)
44 | buff-ruby_engine (1.0.0)
45 | buff-shell_out (1.1.0)
46 | buff-ruby_engine (~> 1.0)
47 | builder (3.2.3)
48 | byebug (11.0.1)
49 | celluloid (0.16.0)
50 | timers (~> 4.0.0)
51 | celluloid-io (0.16.2)
52 | celluloid (>= 0.16.0)
53 | nio4r (>= 1.1.0)
54 | chef-config (15.1.36)
55 | addressable
56 | fuzzyurl
57 | mixlib-config (>= 2.2.12, < 4.0)
58 | mixlib-shellout (>= 2.0, < 4.0)
59 | tomlrb (~> 1.2)
60 | childprocess (0.6.3)
61 | ffi (~> 1.0, >= 1.0.11)
62 | coderay (1.1.2)
63 | concurrent-ruby (1.1.5)
64 | date (2.0.0)
65 | did_you_mean (1.2.0)
66 | diff-lcs (1.3)
67 | domain_name (0.5.20180417)
68 | unf (>= 0.0.5, < 1.0.0)
69 | ed25519 (1.2.4)
70 | erubis (2.7.0)
71 | faraday (0.15.4)
72 | multipart-post (>= 1.2, < 3)
73 | ffi (1.11.1)
74 | fileutils (1.2.0)
75 | fuzzyurl (0.9.0)
76 | gssapi (1.3.0)
77 | ffi (>= 1.0.1)
78 | gyoku (1.3.1)
79 | builder (>= 2.1.2)
80 | hashicorp-checkpoint (0.1.5)
81 | hashie (3.6.0)
82 | hitimes (1.3.1)
83 | http-cookie (1.0.3)
84 | domain_name (~> 0.5)
85 | httpclient (2.8.3)
86 | i18n (1.1.1)
87 | concurrent-ruby (~> 1.0)
88 | json (2.3.1)
89 | listen (3.1.5)
90 | rb-fsevent (~> 0.9, >= 0.9.4)
91 | rb-inotify (~> 0.9, >= 0.9.7)
92 | ruby_dep (~> 1.2)
93 | little-plugger (1.1.4)
94 | log4r (1.1.10)
95 | logging (2.2.2)
96 | little-plugger (~> 1.1)
97 | multi_json (~> 1.10)
98 | method_source (0.9.2)
99 | mime-types (3.2.2)
100 | mime-types-data (~> 3.2015)
101 | mime-types-data (3.2019.0331)
102 | mixlib-authentication (3.0.1)
103 | mixlib-config (3.0.1)
104 | tomlrb
105 | mixlib-shellout (3.0.4)
106 | multi_json (1.13.1)
107 | multipart-post (2.1.1)
108 | net-scp (1.2.1)
109 | net-ssh (>= 2.6.5)
110 | net-sftp (2.1.2)
111 | net-ssh (>= 2.6.5)
112 | net-ssh (5.1.0)
113 | netrc (0.11.0)
114 | nio4r (2.3.1)
115 | nori (2.6.0)
116 | pry (0.12.2)
117 | coderay (~> 1.1.0)
118 | method_source (~> 0.9.0)
119 | pry-byebug (3.7.0)
120 | byebug (~> 11.0)
121 | pry (~> 0.10)
122 | public_suffix (3.1.1)
123 | rb-fsevent (0.10.3)
124 | rb-inotify (0.10.0)
125 | ffi (~> 1.0)
126 | rb-kqueue (0.2.5)
127 | ffi (>= 0.5.0)
128 | rest-client (2.0.2)
129 | http-cookie (>= 1.0.2, < 2.0)
130 | mime-types (>= 1.16, < 4.0)
131 | netrc (~> 0.8)
132 | retryable (2.0.4)
133 | ridley (5.1.1)
134 | addressable
135 | buff-config (~> 2.0)
136 | buff-extensions (~> 2.0)
137 | buff-ignore (~> 1.2)
138 | buff-shell_out (~> 1.0)
139 | celluloid (~> 0.16.0)
140 | celluloid-io (~> 0.16.1)
141 | chef-config (>= 12.5.0)
142 | erubis
143 | faraday (~> 0.9)
144 | hashie (>= 2.0.2, < 4.0.0)
145 | httpclient (~> 2.7)
146 | json (>= 1.7.7)
147 | mixlib-authentication (>= 1.3.0)
148 | retryable (~> 2.0)
149 | semverse (~> 2.0)
150 | varia_model (~> 0.6)
151 | rspec (3.8.0)
152 | rspec-core (~> 3.8.0)
153 | rspec-expectations (~> 3.8.0)
154 | rspec-mocks (~> 3.8.0)
155 | rspec-core (3.8.2)
156 | rspec-support (~> 3.8.0)
157 | rspec-expectations (3.8.4)
158 | diff-lcs (>= 1.2.0, < 2.0)
159 | rspec-support (~> 3.8.0)
160 | rspec-mocks (3.8.1)
161 | diff-lcs (>= 1.2.0, < 2.0)
162 | rspec-support (~> 3.8.0)
163 | rspec-support (3.8.2)
164 | ruby_dep (1.3.1)
165 | rubyntlm (0.6.2)
166 | rubyzip (1.2.3)
167 | semverse (2.0.0)
168 | timers (4.0.4)
169 | hitimes
170 | tomlrb (1.2.8)
171 | unf (0.1.4)
172 | unf_ext
173 | unf_ext (0.0.7.6)
174 | vagrant_cloud (2.0.2)
175 | rest-client (~> 2.0.2)
176 | varia_model (0.6.0)
177 | buff-extensions (~> 2.0)
178 | hashie (>= 2.0.2, < 4.0.0)
179 | wdm (0.1.1)
180 | winrm (2.3.2)
181 | builder (>= 2.1.2)
182 | erubis (~> 2.7)
183 | gssapi (~> 1.2)
184 | gyoku (~> 1.0)
185 | httpclient (~> 2.2, >= 2.2.0.2)
186 | logging (>= 1.6.1, < 3.0)
187 | nori (~> 2.0)
188 | rubyntlm (~> 0.6.0, >= 0.6.1)
189 | winrm-elevated (1.1.1)
190 | winrm (~> 2.0)
191 | winrm-fs (~> 1.0)
192 | winrm-fs (1.3.2)
193 | erubis (~> 2.7)
194 | logging (>= 1.6.1, < 3.0)
195 | rubyzip (~> 1.1)
196 | winrm (~> 2.0)
197 |
198 | PLATFORMS
199 | ruby
200 |
201 | DEPENDENCIES
202 | date
203 | did_you_mean (= 1.2.0)
204 | fileutils
205 | pry-byebug
206 | rspec
207 | vagrant!
208 | vagrant-butcher!
209 |
210 | BUNDLED WITH
211 | 1.16.4
212 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Cassiano Leal
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](http://badge.fury.io/rb/vagrant-butcher)
2 | [](https://travis-ci.org/cassianoleal/vagrant-butcher)
3 | [](https://codeclimate.com/github/cassianoleal/vagrant-butcher)
4 |
5 | # Vagrant::Butcher
6 |
7 | If you're using Vagrant with the Chef-Client provisioner it creates a client and a node on the Chef server when the VM spins up.
8 |
9 | This plugin will automatically get rid of that cruft for you when you destroy the VM.
10 |
11 | ## Installation
12 |
13 | Install this plugin using the Vagrant command line:
14 |
15 | $ vagrant plugin install vagrant-butcher
16 |
17 | ## Usage
18 |
19 | The plugin is loaded automatically once installed.
20 |
21 | ## Configuration
22 |
23 | For most cases, the plugin shouldn't need any configuration. However, there are a few options that can be set. The options are all set in the `Vagrantfile` in the format:
24 |
25 | ```ruby
26 | Vagrant.configure("2") do |config|
27 | ...
28 | config.butcher.