vagrant-puppetconf 0.1.2 → 0.1.3

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/README.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Vagrant::Puppetconf
2
2
 
3
- TODO: Write a gem description
3
+ Edit/update puppet.conf from Vagrantfile
4
+
5
+ Example use case: Vagrant box is configured differently based on the
6
+ environment setting in puppet.conf and you want to be able to easily
7
+ switch between environments.
4
8
 
5
9
  ## Installation
6
10
 
@@ -18,7 +22,21 @@ Or install it yourself as:
18
22
 
19
23
  ## Usage
20
24
 
21
- TODO: Write usage instructions here
25
+ There are two configuration options:
26
+ update_only - if set to false, will clear the value and only add
27
+ configuration options that you specify.
28
+
29
+ updates - takes a hash where the keys are config keys and the values are
30
+ config values.
31
+
32
+ Example Vagrant file:
33
+
34
+ Vagrant::Config.run do |config|
35
+ config.vm.box = "lucid32"
36
+
37
+ config.puppetconf.update_only = false # Overwrite all existing values
38
+ config.puppetconf.updates = {'main/environment' => 'test'} # Set environment to test
39
+ end
22
40
 
23
41
  ## Contributing
24
42
 
@@ -18,7 +18,7 @@ module VagrantPuppetconf
18
18
  @env[:vm].channel.sudo("cp /dev/null /etc/puppet/puppet.conf")
19
19
  end
20
20
  @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")
21
+ @env[:vm].channel.execute("echo -e \"set /files/etc/puppet/puppet.conf/#{path} #{value} \n save\" | sudo augtool")
22
22
  end
23
23
  end
24
24
 
@@ -1,5 +1,5 @@
1
1
  module Vagrant
2
2
  module Puppetconf
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
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.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: