aboutsummaryrefslogtreecommitdiff
path: root/manifests/faillog.pp
blob: 2af2299b01be011a1e5bb13824e332b2bf8b316e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class loginrecords::faillog::enable {
    replace { 'loginrecords-faillog-enable':
        file    => $login_defs_file,
        pattern => '^FAILLOG_ENAB\w+no$',
        replace => 'FAILLOG_ENAB		yes',
    }
    append_if_no_such_line { 'loginrecords-faillog-enable':
        file    => $login_defs_file,
        line    => 'FAILLOG_ENAB		yes',
        require => Replace['loginrecords-faillog-enable'],
    }
}

class loginrecords::faillog::disable {
        replace { 'loginrecords-faillog-disable':
            file => $login_defs_file,
            pattern => '^FAILLOG_ENAB\w+yes$',
            replace => 'FAILLOG_ENAB		no',
        }
        append_if_no_such_line { 'loginrecords-faillog-disable':
            file    => $login_defs_file,
            line    => 'FAILLOG_ENAB		no',
            require => Replace['loginrecords-faillog-disable'],
        }
}