forked from chef-boneyard/cookbooks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[COOK-499] sudo cookbook improvements
- Loading branch information
Showing
6 changed files
with
122 additions
and
105 deletions.
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
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
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 |
---|---|---|
@@ -1,102 +1,104 @@ | ||
{ | ||
"providing": { | ||
}, | ||
"attributes": { | ||
"authorization/sudoers/groups": { | ||
"required": "optional", | ||
"calculated": false, | ||
"choice": [ | ||
|
||
], | ||
"default": "", | ||
"type": "array", | ||
"recipes": [ | ||
|
||
], | ||
"description": "Groups who are allowed sudo ALL", | ||
"display_name": "Sudo Groups" | ||
}, | ||
"authorization": { | ||
"required": "optional", | ||
"calculated": false, | ||
"choice": [ | ||
"name": "sudo", | ||
"description": "Installs sudo and configures /etc/sudoers", | ||
"long_description": "", | ||
"maintainer": "Opscode, Inc.", | ||
"maintainer_email": "cookbooks@opscode.com", | ||
"license": "Apache 2.0", | ||
"platforms": { | ||
"redhat": ">= 0.0.0", | ||
"centos": ">= 0.0.0", | ||
"fedora": ">= 0.0.0", | ||
"ubuntu": ">= 0.0.0", | ||
"debian": ">= 0.0.0", | ||
"freebsd": ">= 0.0.0" | ||
}, | ||
"dependencies": { | ||
}, | ||
"recommendations": { | ||
}, | ||
"suggestions": { | ||
}, | ||
"conflicting": { | ||
}, | ||
"providing": { | ||
}, | ||
"replacing": { | ||
}, | ||
"attributes": { | ||
"authorization": { | ||
"display_name": "Authorization", | ||
"description": "Hash of Authorization attributes", | ||
"type": "hash", | ||
"choice": [ | ||
|
||
], | ||
"type": "hash", | ||
"recipes": [ | ||
|
||
], | ||
"description": "Hash of Authorization attributes", | ||
"display_name": "Authorization" | ||
}, | ||
"authorization/sudoers/users": { | ||
"required": "optional", | ||
"calculated": false, | ||
"choice": [ | ||
|
||
], | ||
"default": "", | ||
"type": "array", | ||
"recipes": [ | ||
], | ||
"calculated": false, | ||
"required": "optional", | ||
"recipes": [ | ||
|
||
], | ||
"description": "Users who are allowed sudo ALL", | ||
"display_name": "Sudo Users" | ||
}, | ||
"authorization/sudoers": { | ||
"required": "optional", | ||
"calculated": false, | ||
"choice": [ | ||
] | ||
}, | ||
"authorization/sudoers": { | ||
"display_name": "Authorization Sudoers", | ||
"description": "Hash of Authorization/Sudoers attributes", | ||
"type": "hash", | ||
"choice": [ | ||
|
||
], | ||
"type": "hash", | ||
"recipes": [ | ||
], | ||
"calculated": false, | ||
"required": "optional", | ||
"recipes": [ | ||
|
||
], | ||
"description": "Hash of Authorization/Sudoers attributes", | ||
"display_name": "Authorization Sudoers" | ||
} | ||
}, | ||
"replacing": { | ||
}, | ||
"dependencies": { | ||
}, | ||
"groupings": { | ||
}, | ||
"recommendations": { | ||
] | ||
}, | ||
"platforms": { | ||
"debian": [ | ||
"authorization/sudoers/users": { | ||
"display_name": "Sudo Users", | ||
"description": "Users who are allowed sudo ALL", | ||
"type": "array", | ||
"default": "", | ||
"choice": [ | ||
|
||
], | ||
"fedora": [ | ||
"calculated": false, | ||
"required": "optional", | ||
"recipes": [ | ||
|
||
], | ||
"centos": [ | ||
] | ||
}, | ||
"authorization/sudoers/groups": { | ||
"display_name": "Sudo Groups", | ||
"description": "Groups who are allowed sudo ALL", | ||
"type": "array", | ||
"default": "", | ||
"choice": [ | ||
|
||
], | ||
"freebsd": [ | ||
"calculated": false, | ||
"required": "optional", | ||
"recipes": [ | ||
|
||
], | ||
"ubuntu": [ | ||
] | ||
}, | ||
"authorization/sudoers/passwordless": { | ||
"display_name": "Passwordless Sudo", | ||
"description": "", | ||
"type": "string", | ||
"default": "false", | ||
"choice": [ | ||
|
||
], | ||
"redhat": [ | ||
"calculated": false, | ||
"required": "optional", | ||
"recipes": [ | ||
|
||
] | ||
}, | ||
"license": "Apache 2.0", | ||
"version": "0.9.1", | ||
"maintainer": "Opscode, Inc.", | ||
"suggestions": { | ||
}, | ||
"recipes": { | ||
"sudo": "Installs sudo and configures /etc/sudoers" | ||
}, | ||
"maintainer_email": "cookbooks@opscode.com", | ||
"name": "sudo", | ||
"conflicting": { | ||
}, | ||
"description": "Installs sudo and configures /etc/sudoers", | ||
"long_description": "" | ||
} | ||
} | ||
}, | ||
"groupings": { | ||
}, | ||
"recipes": { | ||
"sudo": "Installs sudo and configures /etc/sudoers" | ||
}, | ||
"version": "1.0.0" | ||
} |
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
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
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 |
---|---|---|
@@ -1,22 +1,22 @@ | ||
# | ||
# /etc/sudoers | ||
# | ||
# | ||
# Generated by Chef for <%= node[:fqdn] %> | ||
# | ||
# | ||
|
||
Defaults !lecture,tty_tickets,!fqdn | ||
|
||
# User privilege specification | ||
root ALL=(ALL) ALL | ||
root ALL=(ALL) ALL | ||
|
||
<% @sudoers_users.each do |user| -%> | ||
<%= user %> ALL=(ALL) ALL | ||
<%= user %> ALL=(ALL) <%= "NOPASSWD:" if @passwordless %>ALL | ||
<% end -%> | ||
|
||
# Members of the sysadmin group may gain root privileges | ||
%sysadmin ALL=(ALL) ALL | ||
%sysadmin ALL=(ALL) <%= "NOPASSWD:" if @passwordless %>ALL | ||
|
||
<% @sudoers_groups.each do |group| -%> | ||
# Members of the group '<%= group %>' may gain root privileges | ||
%<%= group %> ALL=(ALL) ALL | ||
<% end -%> | ||
%<%= group %> ALL=(ALL) <%= "NOPASSWD:" if @passwordless %>ALL | ||
<% end -%> |