vagrant-puppetconf 0.1.3 → 0.1.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.
- data/lib/vagrant-puppetconf/middleware.rb +10 -1
- data/lib/vagrant-puppetconf/version.rb +1 -1
- data/locales/en.yml +1 -0
- metadata +1 -1
@@ -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
|
-
|
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
|
|
data/locales/en.yml
CHANGED