# === Class: ifort::install # class ifort::install { Exec { path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ], logoutput => 'on_failure', } ## Packages # Dependencies packages if $ifort::dep_pkg_manage == true { # Only if ifort is not already installed ensure_resource('package', $ifort::dep_pkg_name, { 'ensure' => $::is_ifort ? { 'false' => 'present', default => 'absent' } }) } # Silent file file { $ifort::ifort_silent_file_path: ensure => $::is_ifort ? { 'false' => present, default => absent, }, content => template($ifort::ifort_silent_file_tpl), } if $::is_ifort == 'false' { # Uncompress exec { "Uncompress ${ifort::ifort_pkg_path}": command => "zcat ${ifort::ifort_pkg_path} | tar xvf - -C ${ifort::ifort_install_tmp_path} --", creates => "${ifort::ifort_install_tmp_path}/${ifort::ifort_install_dir_name}", onlyif => "test -f ${ifort::ifort_pkg_path}", } -> # Install exec { "Install ifort from ${ifort::ifort_pkg_path} file": command => "${ifort::ifort_install_tmp_path}/${ifort::ifort_install_dir_name}/${ifort::ifort_install_script_name} --silent ${ifort::ifort_silent_file_path}", environment => 'USER=root', creates => $ifort::ifort_bin_path, timeout => '120', require => File[$ifort::ifort_silent_file_path], } } else { # If ifort is available # Remove temp files file { "${ifort::ifort_install_tmp_path}/${ifort::ifort_install_dir_name}": ensure => absent, recurse => true, force => true, } } } # Private class: ifort::install