diff options
Diffstat (limited to 'manifests/faillog')
-rw-r--r-- | manifests/faillog/disable.pp | 19 | ||||
-rw-r--r-- | manifests/faillog/enable.pp | 24 |
2 files changed, 21 insertions, 22 deletions
diff --git a/manifests/faillog/disable.pp b/manifests/faillog/disable.pp index a5d2dc5..c05e6bc 100644 --- a/manifests/faillog/disable.pp +++ b/manifests/faillog/disable.pp @@ -1,12 +1,9 @@ -class loginrecords::faillog::disable { - replace { 'loginrecords-faillog-disable': - file => $login_defs_file, - pattern => '^FAILLOG_ENAB[[:space:]]+yes$', - replacement => 'FAILLOG_ENAB no', - } - line { 'loginrecords-faillog-disable': - file => $login_defs_file, - line => 'FAILLOG_ENAB no', - require => Replace['loginrecords-faillog-disable'], - } +class loginrecords::faillog::disable inherits loginrecords::faillog::enable{ + Replace['loginrecords-faillog']{ + pattern => '^FAILLOG_ENAB[[:space:]]+yes$', + replacement => 'FAILLOG_ENAB no', + } + Line['loginrecords-faillog']{ + line => 'FAILLOG_ENAB no', + } } diff --git a/manifests/faillog/enable.pp b/manifests/faillog/enable.pp index f26dc69..c714b74 100644 --- a/manifests/faillog/enable.pp +++ b/manifests/faillog/enable.pp @@ -1,12 +1,14 @@ -class loginrecords::faillog::enable { - replace { 'loginrecords-faillog-enable': - file => $login_defs_file, - pattern => '^FAILLOG_ENAB[[:space]]+no$', - replacement => 'FAILLOG_ENAB yes', - } - line { 'loginrecords-faillog-enable': - file => $login_defs_file, - line => 'FAILLOG_ENAB yes', - require => Replace['loginrecords-faillog-enable'], - } +class loginrecords::faillog::enable( + $login_defs_file = '/etc/login.defs' +) { + replace{'loginrecords-faillog': + file => $login_defs_file, + pattern => '^FAILLOG_ENAB[[:space]]+no$', + replacement => 'FAILLOG_ENAB yes', + } + line{'loginrecords-faillog': + file => $login_defs_file, + line => 'FAILLOG_ENAB yes', + require => Replace['loginrecords-faillog'], + } } |