Skip to content

Commit

Permalink
added defined resouce types for the 3 kinds of sudoers lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Bode committed Apr 6, 2010
1 parent 598f1c1 commit 550e760
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
19 changes: 19 additions & 0 deletions manifests/alias.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# defined resource that wraps the functionality for creating
# aliases with the sudoers type
# * name - name of alias
# * type - type of sudo alias can be (Cmnd|Host|User|Runas)(_Alias)?
# * items - list of things to be aliased.
define sudo::alias(
$ensure=present,
$sudo_alias, $items,
$target='/etc/sudoers'
) {
sudoers { $name:
type => 'alias',
ensure => $ensure,
sudo_alias => $sudo_alias,
items => $items,
target => $target,
}
}
11 changes: 11 additions & 0 deletions manifests/defaults.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# define that wraps sudoers functionality of sudores
#
define sudo::defaults( $ensure='present', $parameters, $target='/etc/sudoers') {
sudoers { $name:
type => 'default',
ensure => $ensure,
parameters => $parameters,
target => $target,
}
}
21 changes: 21 additions & 0 deletions manifests/spec.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Defined resoruce to manage sudoers user specification lines.
#
# attributes:
# * name - arbitrary string used to determine uniquemenss
# * users - list of users
# * hosts - list of hosts
# * commands - list of commands
define sudo::spec(
$ensure=present,
$users, $hosts, $commands,
$target='/etc/sudoers'
) {
sudoers { $name:
type => 'user_spec',
ensure => $ensure,
users => $users,
hosts => $hosts,
commands => $commands,
target => $target,
}
}
1 change: 0 additions & 1 deletion manifests/tests/sudo.pp

This file was deleted.

0 comments on commit 550e760

Please sign in to comment.