Get debian kernel headers based on architecture
This makes possible to apply openstack_project::slave_common class to debian in chroot, e.g. to create a debian image with puppet element using diskimage-builder Change-Id: I7a661c8b5d4bb632eb32b5018c55474c1c66a4e8
This commit is contained in:
parent
238aa5d037
commit
25c6dddcac
@ -108,9 +108,20 @@ class openstack_project::slave_common(
|
|||||||
}
|
}
|
||||||
'Debian': {
|
'Debian': {
|
||||||
if ($::operatingsystem == 'Debian') {
|
if ($::operatingsystem == 'Debian') {
|
||||||
# install depending on kernel release
|
# install depending on architecture
|
||||||
if ! defined(Package["linux-headers-${::kernelrelease}"]) {
|
case $::architecture {
|
||||||
package { "linux-headers-${::kernelrelease}":
|
'amd64', 'x86_64': {
|
||||||
|
$headers_package = ['linux-headers-amd64']
|
||||||
|
}
|
||||||
|
'x86': {
|
||||||
|
$headers_package = ['linux-headers-686-pae']
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
$headers_package = ["linux-headers-${::kernelrelease}"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ! defined(Package[$headers_package]) {
|
||||||
|
package { $headers_package:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user