-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added defined resouce types for the 3 kinds of sudoers lines
- Loading branch information
Dan Bode
committed
Apr 6, 2010
1 parent
598f1c1
commit 550e760
Showing
4 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.