vagrant-puppetconf 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,11 +14,20 @@ module VagrantPuppetconf
14
14
  end
15
15
 
16
16
  def update
17
+ @env[:vm].channel.sudo("rm -f /etc/puppet/puppet.conf.augsave")
17
18
  unless @env[:vm].config.puppetconf.update_only
18
19
  @env[:vm].channel.sudo("cp /dev/null /etc/puppet/puppet.conf")
19
20
  end
21
+ aug_commands = []
20
22
  @env[:vm].config.puppetconf.updates.each_pair do |path, value|
21
- @env[:vm].channel.execute("echo -e \"set /files/etc/puppet/puppet.conf/#{path} #{value} \n save\" | sudo augtool")
23
+ aug_commands << "set /files/etc/puppet/puppet.conf/#{path} #{value}"
24
+ end
25
+ @env[:vm].channel.execute("echo -e \"#{aug_commands.join("\n")} \n save\" | sudo augtool -b")
26
+ if @env[:vm].channel.execute("ls /etc/puppet/puppet.conf.augsave")
27
+ @env[:ui].info I18n.t('vagrant.plugins.puppetconf.middleware.puppetconf_diff')
28
+ @env[:vm].channel.execute('diff -u /etc/puppet/puppet.conf /etc/puppet/puppet.conf.augsave', :error_check => false) do |type, data|
29
+ @env[:ui].success data, :prefix => false
30
+ end
22
31
  end
23
32
  end
24
33
 
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Puppetconf
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
data/locales/en.yml CHANGED
@@ -5,3 +5,4 @@ en:
5
5
  middleware:
6
6
  create_puppetconf: "Creating puppet.conf"
7
7
  install_augeas: "Installing augeas-tools"
8
+ puppetconf_diff: "diff puppet.conf:"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-puppetconf
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: