From fc5cfc8cca2d9650d0b7e1dcafe92bf69aedadf9 Mon Sep 17 00:00:00 2001 From: Peter Meier Date: Thu, 9 Feb 2012 15:56:09 +0100 Subject: implement #11017 - make file_line type ensurable * Implement a simple destroy method. * Add tests for it * Refactor code, so file is actually read only once. However, due to the nature how provider tests are run, we need to ensure that the file is read before we open it to write it. --- lib/puppet/type/file_line.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib/puppet/type/file_line.rb') diff --git a/lib/puppet/type/file_line.rb b/lib/puppet/type/file_line.rb index 8b45897..9f03771 100644 --- a/lib/puppet/type/file_line.rb +++ b/lib/puppet/type/file_line.rb @@ -23,12 +23,7 @@ Puppet::Type.newtype(:file_line) do EOT - ensurable do - defaultto :present - newvalue(:present) do - provider.create - end - end + ensurable newparam(:name, :namevar => true) do desc 'arbitrary name used as identity' -- cgit v1.2.3