diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2013-01-18 12:03:04 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2013-01-18 12:03:04 -0200 |
commit | 533b8fbd9dfca345151f146f348496fc2a5fa530 (patch) | |
tree | f3486c01a440f628d546beda5b4e4448edaaf1b1 /manifests/faillog | |
parent | b0c0b29cf37451cfe7090e2f53197798c5dbba4b (diff) | |
parent | ed222aced2762800363f4428a26a58e960e22983 (diff) | |
download | puppet-loginrecords-533b8fbd9dfca345151f146f348496fc2a5fa530.tar.gz puppet-loginrecords-533b8fbd9dfca345151f146f348496fc2a5fa530.tar.bz2 |
Merge branch 'master' of ssh://labs.riseup.net/shared-loginrecords
Diffstat (limited to 'manifests/faillog')
-rw-r--r-- | manifests/faillog/disable.pp | 9 | ||||
-rw-r--r-- | manifests/faillog/enable.pp | 14 |
2 files changed, 8 insertions, 15 deletions
diff --git a/manifests/faillog/disable.pp b/manifests/faillog/disable.pp index c05e6bc..c55e39e 100644 --- a/manifests/faillog/disable.pp +++ b/manifests/faillog/disable.pp @@ -1,9 +1,6 @@ +# do not log any faillog 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', + File_line['loginrecords-faillog']{ + line => "FAILLOG_ENAB\tno", } } diff --git a/manifests/faillog/enable.pp b/manifests/faillog/enable.pp index c714b74..6120193 100644 --- a/manifests/faillog/enable.pp +++ b/manifests/faillog/enable.pp @@ -1,14 +1,10 @@ +# manage faillog logging 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'], + file_line{'loginrecords-faillog': + path => $loginrecords::faillog::enable::login_defs_file, + match => '^FAILLOG_ENAB', + line => "FAILLOG_ENAB\tyes", } } |