From 919c6ca49fa38d37f7b6676930b800da70c68494 Mon Sep 17 00:00:00 2001 From: yatin Date: Sat, 27 Oct 2018 00:00:00 +0530 Subject: [PATCH] Install python3-ironicclient in Fedora or RedHat > 7 Fedora repo [1] has python3 packages, start consuming those. [1] http://trunk.rdoproject.org/fedora/puppet-passed-ci/ Adjust wsgi script path and ipxe.efi path for Fedora and RedHat > 7. Change-Id: I93893c6a6b2eb0a382a8696ee9939dd473a71150 --- manifests/params.pp | 6 +++++- manifests/pxe.pp | 9 ++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/manifests/params.pp b/manifests/params.pp index 2e3cd9a7..123c1b85 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -25,6 +25,10 @@ class ironic::params { if ($::os_package_type == 'debian') { $pyvers = '3' $pyver3 = '3' + } elsif ($::os['name'] == 'Fedora') or + ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) { + $pyvers = '3' + $pyver3 = '3.6' } else { $pyvers = '' $pyver3 = '2.7' @@ -56,7 +60,7 @@ class ironic::params { $systemd_python_package = 'systemd-python' $ipxe_rom_dir = '/usr/share/ipxe' $ironic_wsgi_script_path = '/var/www/cgi-bin/ironic' - $ironic_wsgi_script_source = '/usr/lib/python2.7/site-packages/ironic/api/app.wsgi' + $ironic_wsgi_script_source = "/usr/lib/python${$pyver3}/site-packages/ironic/api/app.wsgi" $tftpd_package = 'tftp-server' $ipxe_package = 'ipxe-bootimgs' $syslinux_package = 'syslinux-extlinux' diff --git a/manifests/pxe.pp b/manifests/pxe.pp index fa7a62d5..4a9332f9 100644 --- a/manifests/pxe.pp +++ b/manifests/pxe.pp @@ -69,6 +69,13 @@ class ironic::pxe ( $http_root_real = pick($::ironic::pxe::common::http_root, $http_root) $http_port_real = pick($::ironic::pxe::common::http_port, $http_port) + if ($::os['name'] == 'Fedora') or + ($::os['family'] == 'RedHat' and Integer.new($::os['release']['major']) > 7) { + $arch = "-${::os['architecture']}" + } else { + $arch = '' + } + file { $tftp_root_real: ensure => 'directory', seltype => 'tftpdir_t', @@ -174,7 +181,7 @@ class ironic::pxe ( owner => 'ironic', group => 'ironic', mode => '0744', - source => "${::ironic::params::ipxe_rom_dir}/ipxe.efi", + source => "${::ironic::params::ipxe_rom_dir}/ipxe${arch}.efi", backup => false, require => Anchor['ironic-inspector::install::end'], }