vagrant-orchestrate 0.0.4 → 0.0.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e347bb4479ef234155ae4528bf77d17980207a3
4
- data.tar.gz: 5c5399041fe42ebb9c40d8cd36849ed750d28bf6
3
+ metadata.gz: 4a322cd2fbc31965a3e93c786488c259852f572d
4
+ data.tar.gz: 66abcb2ba9fc1d64f3ae2b95f16aca4732731cda
5
5
  SHA512:
6
- metadata.gz: 4baa7ec4395f5bdb8fa480b6e363e3549192fc847f33f11ac124b8192c1f013e0136cbe73ed10701366ce1c42b5d8c012effc10067226f0417f9dc25c8005b82
7
- data.tar.gz: 1d9a741d245122ae538cf2aca8346190778da500fd9986d475d01fb3683a0ae908a1f86e00c39195ac50852622342185f15cb158d54bef567f5a0eeedc363fe3
6
+ metadata.gz: 441488d5df3e5656441ee417a84caf4fa6db49d76eee4c5668287c713213ad2ed8dfb55511b83921560df54430ef68ae7bbceceafd6726015471b638a447e314
7
+ data.tar.gz: cd3e91eb5a6790a6baa39d3106850510aaea7f0af2b5fc856421524ac75073ad933fd1cc2d52224cb010b618097d16b8c7751481beef9fca7a5d69c1258fbbde
data/README.md CHANGED
@@ -50,7 +50,7 @@ merge that feature into downstream environments to avoid conflicts.
50
50
 
51
51
  ## Contributing
52
52
 
53
- 1. Fork it ( https://github.com/chrisbaldauf/vagrant-orchestrate/fork )
53
+ 1. Fork it ( https://github.com/Cimpress-MCP/vagrant-orchestrate/fork )
54
54
  2. Create your feature branch (`git checkout -b my-new-feature`)
55
55
  3. Commit your changes (`git commit -am 'Add some feature'`)
56
56
  4. Push to the branch (`git push origin my-new-feature`)
data/Vagrantfile ADDED
@@ -0,0 +1,21 @@
1
+ managed_servers = %w( )
2
+
3
+ required_plugins = %w( vagrant-managed-servers )
4
+ required_plugins.each do |plugin|
5
+ system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin
6
+ end
7
+ Vagrant.configure("2") do |config|
8
+ config.ssh.username = "{{YOUR_SSH_USERNAME}}"
9
+ config.ssh.password = "poo"
10
+ config.ssh.private_key_path = "par"
11
+
12
+ managed_servers.each do |instance|
13
+ config.vm.define "managed-#{instance}" do |box|
14
+ box.vm.box = "tknerr/managed-server-dummy"
15
+ box.vm.box_url = "./dummy.box"
16
+ box.vm.provider :managed do |provider|
17
+ provider.server = instance
18
+ end
19
+ end
20
+ end
21
+ end
data/dummy.box ADDED
Binary file
@@ -9,11 +9,9 @@ module VagrantPlugins
9
9
  include Vagrant::Util
10
10
 
11
11
  DEFAULT_SHELL_PATH = "{{YOUR_SCRIPT_PATH}}"
12
- DEFAULT_SHELL_INLINE = "{{YOUR_SCRIPT_COMMAND}}"
13
12
  DEFAULT_WINRM_USERNAME = "{{YOUR_WINRM_USERNAME}}"
14
13
  DEFAULT_WINRM_PASSWORD = "{{YOUR_WINRM_PASSWORD}}"
15
14
  DEFAULT_SSH_USERNAME = "{{YOUR_SSH_USERNAME}}"
16
- DEFAULT_SSH_PASSWORD = "{{YOUR_SSH_PASSWORD}}"
17
15
  DEFAULT_SSH_PRIVATE_KEY_PATH = "{{YOUR_SSH_PRIVATE_KEY_PATH}}"
18
16
  DEFAULT_PLUGINS = ["vagrant-managed-servers"]
19
17
 
@@ -27,7 +25,6 @@ module VagrantPlugins
27
25
  options[:puppet_librarian_puppet] = true
28
26
  options[:puppet_hiera] = true
29
27
 
30
-
31
28
  opts = OptionParser.new do |o|
32
29
  o.banner = "Usage: vagrant orchestrate init [options]"
33
30
  o.separator ""
@@ -126,13 +123,11 @@ module VagrantPlugins
126
123
  end
127
124
 
128
125
  options[:shell_paths] ||= options[:shell_inline] ? [] : [DEFAULT_SHELL_PATH]
129
- options[:shell_inline] ||= DEFAULT_SHELL_INLINE
130
126
  options[:winrm_username] ||= DEFAULT_WINRM_USERNAME
131
127
  options[:winrm_password] ||= DEFAULT_WINRM_PASSWORD
132
128
  options[:communicator] ||= "ssh"
133
129
  options[:ssh_username] ||= DEFAULT_SSH_USERNAME
134
- options[:ssh_password] ||= DEFAULT_SSH_PASSWORD unless options[:ssh_private_key_path]
135
- options[:ssh_private_key_path] ||= DEFAULT_SSH_PRIVATE_KEY_PATH
130
+ options[:ssh_private_key_path] ||= DEFAULT_SSH_PRIVATE_KEY_PATH unless options[:ssh_password]
136
131
 
137
132
  contents = TemplateRenderer.render(Orchestrate.source_root.join("templates/vagrant/Vagrantfile"),
138
133
  provisioners: options[:provisioners],
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Orchestrate
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -44,6 +44,7 @@ describe VagrantPlugins::Orchestrate::Command::Init do
44
44
  subject.execute
45
45
  expect(iso_env.vagrantfile.config.vm.provisioners.first.type).to eq(:shell)
46
46
  expect(iso_env.vagrantfile.config.vm.provisioners.first.config.path).to eq(described_class::DEFAULT_SHELL_PATH)
47
+ expect(iso_env.vagrantfile.config.vm.provisioners.count).to eq(1)
47
48
  end
48
49
  end
49
50
 
@@ -181,7 +182,8 @@ describe VagrantPlugins::Orchestrate::Command::Init do
181
182
  it "has default username and password" do
182
183
  subject.execute
183
184
  expect(iso_env.vagrantfile.config.ssh.username).to eq(described_class::DEFAULT_SSH_USERNAME)
184
- expect(iso_env.vagrantfile.config.ssh.password).to eq(described_class::DEFAULT_SSH_PASSWORD)
185
+ private_key_path = iso_env.vagrantfile.config.ssh.private_key_path.first
186
+ expect(private_key_path).to eq(described_class::DEFAULT_SSH_PRIVATE_KEY_PATH)
185
187
  end
186
188
  end
187
189
 
@@ -206,6 +208,7 @@ describe VagrantPlugins::Orchestrate::Command::Init do
206
208
  it "is passed through" do
207
209
  subject.execute
208
210
  expect(iso_env.vagrantfile.config.ssh.private_key_path.first).to eq("SSH_PRIVATE_KEY_PATH")
211
+ expect(iso_env.vagrantfile.config.ssh.password).to be_nil
209
212
  end
210
213
  end
211
214
  end
@@ -33,7 +33,7 @@ Vagrant.configure("2") do |config|
33
33
  <% if ssh_password -%>
34
34
  config.ssh.password = "<%= ssh_password %>"
35
35
  <% end -%>
36
- <% if !ssh_password -%>
36
+ <% if ssh_private_key_path -%>
37
37
  config.ssh.private_key_path = "<%= ssh_private_key_path %>"
38
38
  <% end -%>
39
39
  <% end -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-orchestrate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Baldauf
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-13 00:00:00.000000000 Z
11
+ date: 2015-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,8 @@ files:
80
80
  - LICENSE
81
81
  - README.md
82
82
  - Rakefile
83
+ - Vagrantfile
84
+ - dummy.box
83
85
  - lib/vagrant-orchestrate.rb
84
86
  - lib/vagrant-orchestrate/command/init.rb
85
87
  - lib/vagrant-orchestrate/command/push.rb