summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Bode <dan@bodepd.com>2010-03-16 06:47:41 -0500
committerDan Bode <dan@bodepd.com>2010-03-16 06:47:41 -0500
commitbfbb6ecf855baf308ad23657c6001daccc3f98d8 (patch)
tree5143ce045eb2ff7666c9711714cf4ff725009bf3 /lib
parent4acbdb2b3c91d9e7aa1c1c6e3c9c66b0f788088e (diff)
last commits before ALPHA release
Diffstat (limited to 'lib')
-rw-r--r--lib/puppet/provider/sudoers/parsed.rb10
-rw-r--r--lib/puppet/type/sudoers.rb1
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/puppet/provider/sudoers/parsed.rb b/lib/puppet/provider/sudoers/parsed.rb
index e18b220..85e9fe1 100644
--- a/lib/puppet/provider/sudoers/parsed.rb
+++ b/lib/puppet/provider/sudoers/parsed.rb
@@ -141,16 +141,16 @@ Puppet::Type.type(:sudoers).provide(
# overriding how lines are written to the file
def self.to_line(hash)
- puts "\nEntering self.to_line for #{hash[:name]}"
- puts "\n#{hash.to_yaml}\n"
+ #puts "\nEntering self.to_line for #{hash[:name]}"
+ #puts "\n#{hash.to_yaml}\n"
# # dynamically call a function based on the value of hash[:type]
if(hash[:record_type] == :blank || hash[:record_type] == :comment)
hash[:line]
- elsif(hash[:sudo_alias])
+ elsif(hash[:type] == 'alias')
self.alias_to_line(hash)
- elsif(hash[:commands])
+ elsif(hash[:type] == 'user_spec')
self.spec_to_line(hash)
- elsif(hash[:parameters])
+ elsif(hash[:type] == 'default')
self.default_to_line(hash)
else
raise Puppet::Error, "dont understand how to write out record \n|#{hash.to_yaml}\n|"
diff --git a/lib/puppet/type/sudoers.rb b/lib/puppet/type/sudoers.rb
index 64d66e0..dcb4cfe 100644
--- a/lib/puppet/type/sudoers.rb
+++ b/lib/puppet/type/sudoers.rb
@@ -140,6 +140,7 @@ Defaults@host x=y,one=1,two=2
self[:type] = 'alias'
checkprops(SUDOERS_DEFAULT, SUDOERS_SPEC)
elsif self[:parameters]
+ self[:type] = 'default'
checkprops(SUDOERS_ALIAS, SUDOERS_SPEC)
elsif self[:users]
self[:type] = 'user_spec'