example for using wrapper types
authorDan Bode <dan@bodepd.com>
Tue, 13 Apr 2010 22:35:24 +0000 (17:35 -0500)
committerDan Bode <dan@bodepd.com>
Tue, 13 Apr 2010 22:35:24 +0000 (17:35 -0500)
tests/sudoers-defined.pp [new file with mode: 0644]

diff --git a/tests/sudoers-defined.pp b/tests/sudoers-defined.pp
new file mode 100644 (file)
index 0000000..a81bdcd
--- /dev/null
@@ -0,0 +1,32 @@
+resources{'sudoers':
+  purge => true,
+}
+sudo::alias{'BLAH1':
+  #target => '/tmp/sudoers',
+  type => 'Cmnd_Alias',
+  items => ['/bin/blah', '/bin/blah4', '/bin/blah2'],
+  require => Sudoers['BHAH2']
+}
+sudoers{'blah4':
+  #target => '/tmp/sudoers',
+  ensure => present,
+  users => 'dan',
+  hosts => 'localhost',
+  commands => '/bin/true',
+}
+sudoers{'BLAH3':
+  ensure => present,
+  sudo_alias => 'Cmnd_Alias',
+  items => ['/bin/blah', '/bin/blah4', '/bin/blah2'],
+  before => Sudoers['BHAH2']
+}
+sudoers{'BHAH2':
+  #target => '/tmp/sudoers',
+ ensure => present,
+  sudo_alias => 'Host_Alias',
+  items => ['blah2', 'blah3', 'blah4', 'blah5'],
+  require => Sudoers['blah4'],
+}
+sudoers{'Defaults@host':
+  parameters => ['x=y', 'one=1', 'two=2'],
+}