Skip to content

Commit

Permalink
Merge pull request #29 from jordiprats/master
Browse files Browse the repository at this point in the history
defaults + ubuntu 20
  • Loading branch information
jordiprats authored Apr 20, 2020
2 parents 90c4980 + 3291aa3 commit a1335fa
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 3 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# CHANGELOG

## 0.1.33

* added support for **Ubuntu 20.04**
* added mode options to configure global default options
- lecture / lecture_file
- badpass_message
- passwd_timeout
- passwd_tries
- insults

## 0.1.32

* modified **sudoers::sudo**:
Expand Down
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
$sudoersd_recurse = true,
$sudoersd_purge = true,
$sudo_timeout = '15',
$lecture = 'once',
$lecture_file = undef,
$badpass_message = undef,
$passwd_tries = undef,
$insults = false,
) inherits sudoers::params {

if($manage_package)
Expand Down
3 changes: 3 additions & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
/^1[468].*$/:
{
}
/^20.*$/:
{
}
default: { fail("Unsupported Ubuntu version! - ${::operatingsystemrelease}") }
}
}
Expand Down
4 changes: 2 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-sudoers",
"version": "0.1.32",
"version": "0.1.33",
"author": "eyp",
"summary": "manages sudoers",
"license": "Apache-2.0",
Expand Down Expand Up @@ -33,7 +33,7 @@
},
{
"operatingsystem": "Ubuntu",
"operatingsystemrelease": [ "14.04", "16.04", "18.04" ]
"operatingsystemrelease": [ "14.04", "16.04", "18.04", "20.04" ]
},
{
"operatingsystem": "SLES",
Expand Down
21 changes: 20 additions & 1 deletion templates/sudoers.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# puppet managed file - DO NOT EDIT
# puppet managed file
#

<% if @requiretty -%>
Expand Down Expand Up @@ -47,6 +47,25 @@ Defaults env_keep += "LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY

Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin

Defaults lecture="<%= @lecture %>"
<% if defined?(@lecture_file) -%>
Defaults lecture_file="<%= @lecture_file %>"
<% end -%>

<% if defined?(@badpass_message) -%>
Defaults badpass_message="<%= @badpass_message %>"
<% end -%>
<% if defined?(@passwd_tries) -%>
Defaults passwd_tries=<%= @passwd_tries %>
<% end -%>
<% if defined?(@passwd_timeout) -%>
Defaults passwd_timeout=<%= @passwd_timeout %>
<% end -%>

<% if @insults -%>
Defaults insults
<% end -%>

root ALL=(ALL) ALL

#no soc un comentari
Expand Down

0 comments on commit a1335fa

Please sign in to comment.