aboutsummaryrefslogtreecommitdiff
path: root/manifests/faillog.pp
blob: 2ec54c4191a19c80abf103c758a4b9b2ff1a1856 (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[[:space]]+no$',
        replacement => '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[[:space:]]+yes$',
        replacement => 'FAILLOG_ENAB		no',
    }
    append_if_no_such_line { 'loginrecords-faillog-disable':
        file    => $login_defs_file,
        line    => 'FAILLOG_ENAB		no',
        require => Replace['loginrecords-faillog-disable'],
    }
}