|
16 | 16 | it { is_expected.to contain_class('csf::install') } |
17 | 17 |
|
18 | 18 | # verify packages and installation |
19 | | - it { is_expected.to contain_package('csf-perl') } |
| 19 | + it { is_expected.to contain_package('perl') } |
20 | 20 | it { is_expected.to contain_exec('csf-install').with('cwd' => '/tmp') } |
21 | 21 | it { is_expected.to contain_exec('csf-install').with('command' => '/usr/bin/curl -o csf.tgz https://download.configserver.com/csf.tgz && tar -xzf csf.tgz && cd csf && sh install.sh') } |
22 | 22 | it { is_expected.to contain_exec('csf-install').with('creates' => '/usr/sbin/csf') } |
23 | 23 | it { is_expected.to contain_exec('csf-install').with('notify' => 'Service[csf]') } |
24 | | - it { is_expected.to contain_exec('csf-install').with('require' => 'Package[csf-perl]') } |
| 24 | + it { is_expected.to contain_exec('csf-install').with('require' => 'Package[perl]') } |
25 | 25 |
|
26 | | - it { is_expected.to contain_package('iptables').with('ensure' => 'installed') } |
| 26 | + it { is_expected.to contain_package('iptables').with('ensure' => 'present') } |
27 | 27 |
|
28 | | - if facts[:operatingsystem] == 'CentOS' && facts[:operatingsystemmajrelease].to_i < 7 |
29 | | - it { is_expected.to contain_package('iptables-ipv6').with('ensure' => 'installed') } |
30 | | - it { is_expected.to contain_package('iptables-ipv6').with('before' => 'Exec[csf-install]') } |
| 28 | + if facts[:operatingsystem] == 'CentOS' |
| 29 | + it { is_expected.to contain_package('perl-libwww-perl').with('ensure' => 'present') } |
| 30 | + it { is_expected.to contain_package('perl-LWP-Protocol-https').with('ensure' => 'present') } |
| 31 | + it { is_expected.to contain_package('perl-GDGraph').with('ensure' => 'present') } |
| 32 | + end |
| 33 | + |
| 34 | + if facts[:operatingsystem] == 'Ubuntu' |
| 35 | + it { is_expected.to contain_package('libwww-perl').with('ensure' => 'present') } |
| 36 | + it { is_expected.to contain_package('liblwp-protocol-https-perl').with('ensure' => 'present') } |
| 37 | + it { is_expected.to contain_package('libgd-graph-perl').with('ensure' => 'present') } |
31 | 38 | end |
32 | 39 |
|
33 | 40 | # check our configuration |
|
0 commit comments