44 lines
1.1 KiB
Puppet
44 lines
1.1 KiB
Puppet
# === 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}",
|
|
}
|
|
|
|
}
|
|
|
|
} # Private class: ifort::install
|