diff options
author | Jiang, Yunhong <yunhong.jiang@intel.com> | 2017-02-17 06:18:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-17 06:18:42 +0000 |
commit | f156e825018f6cdd996406aede3f821fc1f9fcb1 (patch) | |
tree | f1671ebfd92021f4e72b21995a67862ea96bf9b5 /fuel-plugin/deployment_scripts/puppet/manifests | |
parent | 48f1b1f5298bc4960f261df412315d6e15897c43 (diff) | |
parent | 4a69d386c55f01ef3645ad500d232f27fc7c2444 (diff) |
Merge "[fuel-plugin] Employ dedicated reboot task"
Diffstat (limited to 'fuel-plugin/deployment_scripts/puppet/manifests')
-rw-r--r-- | fuel-plugin/deployment_scripts/puppet/manifests/kvm-install.pp | 46 |
1 files changed, 30 insertions, 16 deletions
diff --git a/fuel-plugin/deployment_scripts/puppet/manifests/kvm-install.pp b/fuel-plugin/deployment_scripts/puppet/manifests/kvm-install.pp index 4c04aa0a6..fba3e38ce 100644 --- a/fuel-plugin/deployment_scripts/puppet/manifests/kvm-install.pp +++ b/fuel-plugin/deployment_scripts/puppet/manifests/kvm-install.pp @@ -1,18 +1,32 @@ $kvm_settings = hiera('fuel-plugin-kvm') -if $operatingsystem == 'Ubuntu' { - if $kvm_settings['use_kvm'] { - package { 'linux-headers-4.4.6-rt14nfv': - ensure => "1.0.OPNFV", - notify => Reboot['after_run'], - } -> - package { 'linux-image-4.4.6-rt14nfv': - ensure => "1.0.OPNFV", - notify => Reboot['after_run'], - } - reboot { 'after_run': - apply => finished, - } - } else { - } -} elsif $operatingsystem == 'CentOS' { + +case $::operatingsystem { + 'Ubuntu': { + $version = '4.4.6-rt14nfv' + $kernel_kit = ["linux-headers-${version}", "linux-image-${version}"] + $kernel_src = "/usr/src/linux-headers-${version}" + $kernel_src_link = "/lib/modules/${version}/build" + } + default: { + fail("Unsupported operating system: ${::osfamily}/${::operatingsystem}") + } + +} + +if $kvm_settings['use_kvm'] { + $ensure_pkg = '1.0.OPNFV' + $ensure_link = 'link' +} else { + $ensure_pkg = 'purged' + $ensure_link = 'absent' +} + +package { $kernel_kit: + ensure => $ensure_pkg, + before => File[$kernel_src_link], +} + +file { $kernel_src_link: + ensure => $ensure_link, + target => $kernel_src, } |