summaryrefslogtreecommitdiff
path: root/lib/puppet/type
diff options
context:
space:
mode:
authorDan Bode <dan@puppetlabs.com>2012-10-02 18:53:53 -0700
committerDan Bode <dan@puppetlabs.com>2012-10-02 18:53:53 -0700
commitcbc90d38347f8ca61de2208b16ffc76f9fd5938c (patch)
treee000b4755f7157439d48aaeab0fe081685ae0e59 /lib/puppet/type
parent1564c473a93105399bd777e78090463156948f2e (diff)
downloadpuppet-inifile-cbc90d38347f8ca61de2208b16ffc76f9fd5938c.tar.gz
puppet-inifile-cbc90d38347f8ca61de2208b16ffc76f9fd5938c.tar.bz2
Make value a property
This commit converts value to a property so that it can be managed and modified when a file already has a value set. It was previously treating the line creation state the same as the update case, which is not in alignment with Puppet's model.
Diffstat (limited to 'lib/puppet/type')
-rw-r--r--lib/puppet/type/ini_setting.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/puppet/type/ini_setting.rb b/lib/puppet/type/ini_setting.rb
index 50b6b38..4506231 100644
--- a/lib/puppet/type/ini_setting.rb
+++ b/lib/puppet/type/ini_setting.rb
@@ -17,10 +17,6 @@ Puppet::Type.newtype(:ini_setting) do
desc 'The name of the setting to be defined.'
end
- newparam(:value) do
- desc 'The value of the setting to be defined.'
- end
-
newparam(:path) do
desc 'The ini file Puppet will ensure contains the specified setting.'
validate do |value|
@@ -43,4 +39,9 @@ Puppet::Type.newtype(:ini_setting) do
end
end
+ newproperty(:value) do
+ desc 'The value of the setting to be defined.'
+ end
+
+
end