vagrant-invade 0.4.4 → 0.4.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: 1aad58eb8fd8f1802188d135b0e6f2a5d4ce8a62
4
- data.tar.gz: 8d28a95cc2fed4b8880d9ab2d2644e862dae60c3
3
+ metadata.gz: 7bf54260067f47e80923d6cd17aad5fd106b6a4f
4
+ data.tar.gz: d29622a60426162f6db16fa554cf102755b44295
5
5
  SHA512:
6
- metadata.gz: c3d051ea1548406362b8ae94764d6a396451cfd805a469844c5b5ae5ccacae705b1b3dab4a5f6a5cbea058f9a4c8050bf0e292b9686181b1c10913425e28be10
7
- data.tar.gz: 52845d4ba8eac250e764be9ec4f16bf7fc7feb0c0aeb13c7212811a768ecc2d77ca34de88e221019a579bba583d007eaffa460aab613e3f11683d1089ad3286e
6
+ metadata.gz: c4f988ba5de968dcbde596d846e7590abeef3d922b3b92e0149f89251a8a42f2784df5a0f5dc9dcae7b9f32c1fa667b5d2f6e6df03b2850f5e9a483e413ba77a
7
+ data.tar.gz: 08dad8d04de000b9e111432c2b0948f5f0b7ef355bd2b6503d84871b7a93581d06af8e1a78fe3087218bc93c442759099a433a6bff342bb8dc917bbab3899fe2
data/Gemfile.lock CHANGED
@@ -23,7 +23,7 @@ GIT
23
23
  PATH
24
24
  remote: .
25
25
  specs:
26
- vagrant-invade (0.4.3)
26
+ vagrant-invade (0.4.4)
27
27
 
28
28
  GEM
29
29
  remote: https://rubygems.org/
data/invade.yml.dist CHANGED
@@ -32,23 +32,27 @@ machines:
32
32
 
33
33
  # Synced Folder settings
34
34
  # synced_folder:
35
- # nfs:
36
- # name: 'www'
35
+ # www:
36
+ # type: nfs
37
37
  # path: '/www'
38
38
  # source: '..'
39
39
  # mount_options:
40
40
  # - nolock
41
+ #
42
+ # ssh:
43
+ # type: nfs
44
+ # path: '/home/vagrant/.ssh/'
45
+ # source: '/Users/$USER/.ssh/'
41
46
 
42
47
  # provision:
43
- # shell:
44
- # name: 'set-permissions'
48
+ # set-permissions:
45
49
  # inline: 'chmod 777 /tmp'
46
50
 
47
- # shell:
48
- # name: 'run-composer'
51
+ # run-composer:
49
52
  # path: '/home/vagrant/provision/shell/run-composer.sh'
50
53
 
51
- # puppet:
54
+ # puppet-agent:
55
+ # type: 'puppet'
52
56
  # manifests_path: 'puppet/manifests'
53
57
  # manifest_file: 'init.pp'
54
58
  # module_path:
@@ -55,22 +55,23 @@ module VagrantPlugins
55
55
  unless section['synced_folder'] == nil
56
56
  part['synced_folder'] = ''
57
57
 
58
- section['synced_folder'].each do |type, data|
59
- parts = Generator::Section::SyncedFolder.new(machine, type, data).generate
58
+ section['synced_folder'].each do |name, data|
59
+ parts = Generator::Section::SyncedFolder.new(machine, data).generate
60
60
  part['synced_folder'].concat(parts)
61
61
  end
62
62
  end
63
63
 
64
- # SYNCED FOLDER
64
+ # PROVISION
65
65
  unless section['provision'] == nil
66
66
  part['provision'] = ''
67
67
 
68
- section['provision'].each do |type, data|
69
- parts = Generator::Section::Provision.new(machine, type, data).generate
68
+ section['provision'].each do |name, data|
69
+ parts = Generator::Section::Provision.new(machine, name, data).generate
70
70
  part['provision'].concat(parts)
71
71
  end
72
72
  end
73
73
 
74
+ # PLUGIN
74
75
  unless section['plugin'] == nil
75
76
  part['plugin'] = ''
76
77
 
@@ -32,14 +32,14 @@ module VagrantPlugins
32
32
 
33
33
  # VM
34
34
  unless sections['vm'] == nil
35
- @env[:ui].info("\n[Invade] #{machine.upcase}: Validating VM configuration...") unless quiet
35
+ @env[:ui].info("\n[Invade] #{machine.upcase}: Validating VM section...") unless quiet
36
36
 
37
37
  sections['vm'] = Validator::VM.new(env, sections['vm']).validate
38
38
  end
39
39
 
40
40
  # NETWORK
41
41
  unless sections['network'] == nil
42
- @env[:ui].info("\n[Invade] #{machine.upcase}: Validating network configuration...") unless quiet
42
+ @env[:ui].info("\n[Invade] #{machine.upcase}: Validating NETWORK section...") unless quiet
43
43
 
44
44
  sections['network'].each do |type, network|
45
45
  @env[:ui].info("\tNetwork: #{type}") unless quiet
@@ -51,52 +51,52 @@ module VagrantPlugins
51
51
  when 'public', 'puplic_network', 'publicnetwork', 'public-network'
52
52
  network = Validator::Network::PublicNetwork.new(@machine_name, network).validate
53
53
  else
54
- raise StandardError, "Network type unknown or not set. Please check the network configuration."
54
+ raise StandardError, "Network type unknown or not set. Please check network section in configuration."
55
55
  end
56
56
  end
57
57
  end
58
58
 
59
59
  # PROVIDER
60
60
  unless sections['provider'] == nil
61
- @env[:ui].info("\n[Invade] #{machine.upcase}: Validating provider configuration...") unless quiet
61
+ @env[:ui].info("\n[Invade] #{machine.upcase}: Validating PROVIDER section...") unless quiet
62
62
 
63
63
  sections['provider'].each do |type, provider|
64
- @env[:ui].info("\tProvider: #{type}") unless quiet
64
+ @env[:ui].info(" Provider: #{type}") unless quiet
65
65
  case type
66
66
  when 'virtualbox'
67
67
  provider = Validator::Provider::VirtualBox.new(env, provider).validate
68
68
  when 'vmware'
69
69
  provider = Validator::Provider::VMware.new(env, provider).validate
70
70
  else
71
- raise StandardError, "Provider unknown or not set. Please check configuration file."
71
+ raise StandardError, "Provider unknown or not set. Please check provider section in configuration."
72
72
  end
73
73
  end
74
74
  end
75
75
 
76
76
  # SYNCED FOLDER
77
77
  unless sections['synced_folder'] == nil
78
- @env[:ui].info("\n[Invade] #{machine.upcase}: Validating synced folder configuration...") unless quiet
78
+ @env[:ui].info("\n[Invade] #{machine.upcase}: Validating SYNCED FOLDER section...") unless quiet
79
79
 
80
- sections['synced_folder'].each do |type, sf|
81
- @env[:ui].info("\tSynced Folder: #{type}") unless quiet
82
- case type
80
+ sections['synced_folder'].each do |name, sf|
81
+ @env[:ui].info(" Synced Folder: #{name}") unless quiet
82
+ case sf['type']
83
83
  when 'nfs'
84
84
  sf = Validator::SyncedFolder::NFS.new(env, sf).validate
85
85
  when 'vb'
86
86
  sf = Validator::SyncedFolder::VB.new(env, sf).validate
87
87
  else
88
- raise StandardError, "Synced Folder type unknown or not set. Please check configuration file."
88
+ raise StandardError, "Synced Folder type unknown or not set. Please check synced folder section in configuration."
89
89
  end
90
90
  end
91
91
  end
92
92
 
93
93
  # PROVISION
94
94
  unless sections['provision'] == nil
95
- @env[:ui].info("\n[Invade] #{machine.upcase}: Validating provision configuration...") unless quiet
95
+ @env[:ui].info("\n[Invade] #{machine.upcase}: Validating PROVISION section...") unless quiet
96
96
 
97
- sections['provision'].each do |type, provision|
98
- @env[:ui].info("\tProvision: #{type}") unless quiet
99
- case type
97
+ sections['provision'].each do |name, provision|
98
+ @env[:ui].info(" Provision: #{name}") unless quiet
99
+ case provision['type']
100
100
  when 'shell'
101
101
  provision = Validator::Provision::Shell.new(env, provision).validate
102
102
  when 'shellinline', 'shell-inline'
@@ -106,23 +106,23 @@ module VagrantPlugins
106
106
  when 'puppet-agent', 'puppetagent', 'puppet-server', 'puppet-master'
107
107
  provision = Validator::Provision::PuppetAgent.new(env, provision).validate
108
108
  else
109
- raise StandardError, "Provision type unknown or not set. Please check configuration file."
109
+ raise StandardError, "Provision type unknown or not set. Please check provision section in configuration."
110
110
  end
111
111
  end
112
112
  end
113
113
 
114
114
  # SSH
115
115
  unless sections['ssh'] == nil
116
- @env[:ui].info("\n[Invade] #{machine.upcase}: Validating SSH configuration...") unless quiet
116
+ @env[:ui].info("\n[Invade] #{machine.upcase}: Validating SSH section...") unless quiet
117
117
 
118
118
  sections['ssh'] = Validator::SSH.new(env, sections['ssh']).validate
119
119
  end
120
120
 
121
121
  unless sections['plugin'] == nil
122
- @env[:ui].info("\n[Invade] #{machine.upcase}: Validating plugin configuration...") unless quiet
122
+ @env[:ui].info("\n[Invade] #{machine.upcase}: Validating PLUGIN section...") unless quiet
123
123
 
124
124
  sections['plugin'].each do |type, plugin|
125
- @env[:ui].info("\tPlugin: #{type}") unless quiet
125
+ @env[:ui].info(" Plugin: #{type}") unless quiet
126
126
  case type
127
127
  when 'hostmanager'
128
128
  plugin = Validator::Plugin::HostManager.new(env, plugin).validate
@@ -131,7 +131,7 @@ module VagrantPlugins
131
131
  when 'r10k'
132
132
  plugin = Validator::Plugin::R10k.new(env, plugin).validate
133
133
  else
134
- raise StandardError, "Plugin type unknown or not set. Please check configuration file."
134
+ raise StandardError, "Plugin type unknown or not set. Please check plugin section in configuration."
135
135
  end
136
136
  end
137
137
  end
@@ -8,10 +8,11 @@ module VagrantPlugins
8
8
  class Shell
9
9
 
10
10
  attr_reader :result
11
- attr_accessor :machine_name, :shell_data
11
+ attr_accessor :machine_name, :name, :shell_data
12
12
 
13
- def initialize(machine_name, shell_data, result: nil)
13
+ def initialize(machine_name, name, shell_data, result: nil)
14
14
  @machine_name = machine_name
15
+ @shell_name = name
15
16
  @shell_data = shell_data
16
17
  @result = result
17
18
  end
@@ -26,7 +27,7 @@ module VagrantPlugins
26
27
  machine_name = @machine_name
27
28
 
28
29
  # Values for shell provision section
29
- name = @shell_data['name']
30
+ name = @shell_name
30
31
  path = @shell_data['path']
31
32
  binary = @shell_data['binary']
32
33
  privileged = @shell_data['privileged']
@@ -5,15 +5,16 @@ module VagrantPlugins
5
5
 
6
6
  require 'erubis'
7
7
 
8
- class Shell
8
+ class ShellInline
9
9
 
10
10
  attr_reader :result
11
- attr_accessor :machine_name, :shell_inline_data
11
+ attr_accessor :machine_name, :name, :shell_inline_data
12
12
 
13
- def initialize(machine_name, shell_inline_data, result: nil)
13
+ def initialize(machine_name, name, shell_inline_data, result: nil)
14
14
  @machine_name = machine_name
15
- @shell_inline_data = shell_inline_data
16
- @result = result
15
+ @shell_inline_name = name
16
+ @shell_inline_data = shell_inline_data
17
+ @result = result
17
18
  end
18
19
 
19
20
  def build
@@ -26,7 +27,7 @@ module VagrantPlugins
26
27
  machine_name = @machine_name
27
28
 
28
29
  # Values for shell provision section
29
- name = @shell_inline_data['name']
30
+ name = @shell_inline_name
30
31
  inline = @shell_inline_data['inline']
31
32
  binary = @shell_inline_data['binary']
32
33
  privileged = @shell_inline_data['privileged']
@@ -5,21 +5,21 @@ module VagrantPlugins
5
5
 
6
6
  class Provision
7
7
 
8
- attr_accessor :machine_name, :type, :provision_data
8
+ attr_accessor :machine_name, :name, :provision_data
9
9
 
10
- def initialize(machine_name, type, provision_data)
10
+ def initialize(machine_name, name, provision_data)
11
11
  @machine_name = machine_name
12
- @type = type
12
+ @name = name
13
13
  @provision_data = provision_data
14
14
  end
15
15
 
16
16
  def generate
17
- case @type
17
+ case @provision_data['type']
18
18
  when 'shell'
19
- provision = Builder::Provision::Shell.new(@machine_name, @provision_data)
20
- when 'shell_inline', 'inline', 'shellinline'
21
- provision = Builder::Provision::ShellInline.new(@machine_name, @provision_data)
22
- when 'puppet', 'puppetappy', 'puppet-apply'
19
+ provision = Builder::Provision::Shell.new(@machine_name, @name, @provision_data)
20
+ when 'shell-inline', 'inline', 'shellinline'
21
+ provision = Builder::Provision::ShellInline.new(@machine_name, @name, @provision_data)
22
+ when 'puppet', 'puppetapply', 'puppet-apply'
23
23
  provision = Builder::Provision::PuppetApply.new(@machine_name, @provision_data)
24
24
  when 'puppet-agent', 'puppetagent'
25
25
  provision = Builder::Provision::PuppetAgent.new(@machine_name, @provision_data)
@@ -5,16 +5,15 @@ module VagrantPlugins
5
5
 
6
6
  class SyncedFolder
7
7
 
8
- attr_accessor :machine_name, :type, :synced_folder_data
8
+ attr_accessor :machine_name, :synced_folder_data
9
9
 
10
- def initialize(machine_name, type, synced_folder_data)
10
+ def initialize(machine_name, synced_folder_data)
11
11
  @machine_name = machine_name
12
- @type = type
13
12
  @synced_folder_data = synced_folder_data
14
13
  end
15
14
 
16
15
  def generate
17
- case @type
16
+ case @synced_folder_data['type']
18
17
  when 'vb', 'virtualbox'
19
18
  synced_folder = Builder::SyncedFolder::VirtualBox.new(@machine_name, @synced_folder_data)
20
19
  when 'nfs'
@@ -1,27 +1,27 @@
1
1
  config.vm.define "<%= machine_name %>" do |<%= machine_name %>|
2
2
 
3
3
  <% if vm %>
4
- # VM configuration
4
+ # --- VM Section ---
5
5
  <%= vm %>
6
6
  <% end %>
7
7
  <% if network %>
8
- # Network configuration
8
+ # --- Network Section ---
9
9
  <%= network %>
10
10
  <% end %>
11
11
  <% if provider %>
12
- # Provider configuration
12
+ # --- Provider Section ---
13
13
  <%= provider %>
14
14
  <% end %>
15
15
  <% if synced_folder %>
16
- # Synced folder configuration
16
+ # --- Synced Folder Section ---
17
17
  <%= synced_folder %>
18
18
  <% end %>
19
19
  <% if provision %>
20
- # Provision configuration
20
+ # --- Provision Section ---
21
21
  <%= provision %>
22
22
  <% end %>
23
23
  <% if plugin %>
24
- # Plugin configuration
24
+ # --- Plugin Section
25
25
  <%= plugin %>
26
26
  <% end %>
27
27
  end
@@ -1 +1,2 @@
1
- <%= machine_name %>.vm.network "private_network"<% if ip %>, ip: "<%= ip %>"<% end %><% if dhcp %>, type: "<%= dhcp %>"<% end %><% if auto_config %>, auto_config: <%= auto_config %><% end %>
1
+
2
+ <%= machine_name %>.vm.network "private_network"<% if ip %>, ip: "<%= ip %>"<% end %><% if dhcp %>, type: "<%= dhcp %>"<% end %><% if auto_config %>, auto_config: <%= auto_config %><% end %>
@@ -1,5 +1,5 @@
1
1
 
2
- <%= machine_name %>.vm.network "public_network"
3
- <% if ip %>, ip: <%= ip %><% end %>
4
- <% if type %>, type: <%= type %><% end %>
5
- <% if auto_config %>, auto_config: <%= auto_config %><% end %>
2
+ <%= machine_name %>.vm.network "public_network"
3
+ <% if ip %>, ip: <%= ip %><% end %>
4
+ <% if type %>, type: <%= type %><% end %>
5
+ <% if auto_config %>, auto_config: <%= auto_config %><% end %>
@@ -1,3 +1,4 @@
1
+
1
2
  <%= machine_name %>.vm.provider :virtualbox do |virtualbox|
2
3
  virtualbox.name = '<%= name %>'
3
4
  virtualbox.cpus = <%= cpus %>
@@ -1,4 +1,5 @@
1
- <%= machine_name %>.vm.provider :vmware_desktop do |vmware|
1
+
2
+ <%= machine_name %>.vm.provider :vmware_desktop do |vmware|
2
3
  vmware.vmx['displayName'] = '<%= name %>'
3
4
  vmware.vmx['memsize'] = <%= memory %>
4
5
  vmware.vmx['numvcpus'] = <%= cpus %>
@@ -1,4 +1,5 @@
1
- <%= machine_name %>.vm.provision "puppet_server" do |puppet_agent|
1
+
2
+ <%= machine_name %>.vm.provision "puppet_server" do |puppet_agent|
2
3
  <% if puppet_server %>
3
4
  puppet_agent.puppet_server = '<%= puppet_server %>'
4
5
  <% end %>
@@ -1,4 +1,5 @@
1
- <%= machine_name %>.vm.provision "puppet" do |puppet_apply|
1
+
2
+ <%= machine_name %>.vm.provision "puppet" do |puppet_apply|
2
3
  <% if manifests_path %>
3
4
  puppet_apply.manifests_path = '<%= manifests_path %>'
4
5
  <% end %>
@@ -1,2 +1,3 @@
1
- <%= machine_name %>.vm.provision "shell",
2
- path: <%= path %><% unless name %>, name: <%= name %><% end %><% unless binary %>, binary: <%= binary %><% end %><% unless privileged %>, privileged: <%= privileged %><% end %>
1
+
2
+ <%= machine_name %>.vm.provision "shell",
3
+ path: '<%= path %>'<% if name %>, name: '<%= name %>'<% end %><% if binary %>, binary: <%= binary %><% end %><% if privileged %>, privileged: <%= privileged %><% end %>
@@ -1,2 +1,3 @@
1
- <%= machine_name %>.vm.provision "shell",
2
- inline: <%= inline %><% unless name %>, name: <%= name %><% end %><% unless binary %>, binary: <%= binary %><% end %><% unless privileged %>, privileged: <%= privileged %><% end %>
1
+
2
+ <%= machine_name %>.vm.provision "shell",
3
+ inline: '<%= inline %>'<% if name %>, name: '<%= name %>'<% end %><% if binary %>, binary: <%= binary %><% end %><% if privileged %>, privileged: <%= privileged %><% end %>
@@ -1,4 +1,5 @@
1
- <%= machine_name %>.vm.synced_folder '<%= source %>', '<%= path %>',
1
+
2
+ <%= machine_name %>.vm.synced_folder '<%= source %>', '<%= path %>',
2
3
  type: 'nfs'<% if mount_options %>, mount_options: <%= mount_options %><% end %><% if enabled %>, disabled: true<% end %>
3
4
  <% if uid %>
4
5
  <%= machine_name %>.nfs.map_uid = <%= uid %>
@@ -1 +1 @@
1
- <%= machine_name -%>.vm.synced_folder <%= source -%>, <%= path -%>, id: 'vagrant-root', owner: <%= owner -%>, <%= group -%>, mount_options: ["dmode=<%= dmode -%>,fmode=<%= fmode -%>], disabled: <%= enabled-%>
1
+ <%= machine_name -%>.vm.synced_folder <%= source -%>, <%= path -%>, id: 'vagrant-root', owner: <%= owner -%>, <%= group -%>, mount_options: ["dmode=<%= dmode -%>,fmode=<%= fmode -%>], disabled: <%= enabled-%>
@@ -1,4 +1,5 @@
1
- <%= machine_name %>.vm.box = '<%= box %>'
1
+
2
+ <%= machine_name %>.vm.box = '<%= box %>'
2
3
  <% if url %>
3
4
  <%= machine_name %>.vm.box_url = '<%= url %>'
4
5
  <% end %>
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Invade
3
- VERSION = '0.4.4'
3
+ VERSION = '0.4.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-invade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lennart Stein
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-30 00:00:00.000000000 Z
11
+ date: 2015-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler