|
89 | 89 | end |
90 | 90 |
|
91 | 91 | if facts[:osfamily] == 'Debian' |
92 | | - it { should contain_package('grub-common').with_ensure('installed') } |
93 | | - it { should contain_package('grub-efi-amd64-bin').with_ensure('installed') } |
| 92 | + it { should contain_package('grub-common').with_ensure('present') } |
| 93 | + it { should contain_package('grub-efi-amd64-bin').with_ensure('present') } |
94 | 94 |
|
95 | 95 | tftp_root = case facts[:operatingsystem] |
96 | 96 | when 'Ubuntu' |
|
108 | 108 | it { should contain_file("#{tftp_root}/grub2/shim.efi").with_ensure('link') } |
109 | 109 | elsif facts[:osfamily] == 'RedHat' |
110 | 110 | if facts[:operatingsystemmajrelease].to_i > 6 |
111 | | - it { should contain_package('grub2-efi').with_ensure('installed') } |
112 | | - it { should contain_package('grub2-efi-modules').with_ensure('installed') } |
113 | | - it { should contain_package('grub2-tools').with_ensure('installed') } |
114 | | - it { should contain_package('shim').with_ensure('installed') } |
| 111 | + it { should contain_package('grub2-efi').with_ensure('present') } |
| 112 | + it { should contain_package('grub2-efi-modules').with_ensure('present') } |
| 113 | + it { should contain_package('grub2-tools').with_ensure('present') } |
| 114 | + it { should contain_package('shim').with_ensure('present') } |
115 | 115 |
|
116 | 116 | case facts[:operatingsystem] |
117 | 117 | when /^(RedHat|Scientific|OracleLinux)$/ |
|
125 | 125 | it { should contain_file("#{tftp_root}/grub2/shim.efi").with_source('/boot/efi/EFI/centos/shim.efi') } |
126 | 126 | end |
127 | 127 | else |
128 | | - it { should contain_package('grub').with_ensure('installed') } |
| 128 | + it { should contain_package('grub').with_ensure('present') } |
129 | 129 | it { should contain_file('/var/lib/tftpboot/grub/grubx64.efi').with_ensure('file').with_owner('root').with_mode('0644').with_source('/boot/efi/EFI/redhat/grub.efi') } |
130 | 130 | it { should contain_file('/var/lib/tftpboot/grub/shim.efi').with_ensure('link') } |
131 | 131 | end |
|
0 commit comments