diff --git a/manifests/init.pp b/manifests/init.pp index 3cdc653..034ed64 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -44,9 +44,14 @@ class ifort ( $ifort_install_tmp_path = $ifort::params::ifort_install_tmp_path, $ifort_install_dir_name = $ifort::params::ifort_install_dir_name, $ifort_install_script_name = $ifort::params::ifort_install_script_name, + $ifort_silent_file_path = $ifort::params::ifort_silent_file_path, + $ifort_silent_file_tpl = $ifort::params::ifort_silent_file_tpl, + $ifort_lic_file_path = $ifort::params::ifort_lic_file_path, ) inherits ifort::params { validate_absolute_path($ifort::ifort_pkg_path) + validate_absolute_path($ifort::ifort_silent_file_path) + validate_absolute_path($ifort::ifort_lic_file_path) include ifort::install diff --git a/manifests/install.pp b/manifests/install.pp index 9100fc7..ea16d97 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -19,6 +19,16 @@ class ifort::install { } + # 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 diff --git a/manifests/params.pp b/manifests/params.pp index 11f5d3d..a63c8be 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -11,7 +11,7 @@ class ifort::params { $dep_pkg_ensure = 'present' # Useless if use is_ifort instead $dep_pkg_manage = true - ## Archives + ## Archive # Compiler $ifort_pkg_url = '' $ifort_pkg_path = '' @@ -19,6 +19,13 @@ class ifort::params { $ifort_install_dir_name = 'l_fcompxe_2015.2.164' # Directory name in the archive $ifort_install_script_name = 'install.sh' + ## Install + # Silent + $ifort_silent_file_path = '/tmp/silent_ifort.cfg' + $ifort_silent_file_tpl = 'ifort/silent_install.cfg.erb' + # Licence file + $ifort_lic_file_path = '' + } } } diff --git a/templates/silent_install.cfg.erb b/templates/silent_install.cfg.erb new file mode 100644 index 0000000..40de7d5 --- /dev/null +++ b/templates/silent_install.cfg.erb @@ -0,0 +1,9 @@ +CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes +CONTINUE_WITH_OPTIONAL_ERROR=yes +PSET_INSTALL_DIR=/opt/intel +INSTALL_MODE=NONRPM +ACCEPT_EULA=accept +COMPONENTS=ALL +ACTIVATION_TYPE=license_server +ACTIVATION_LICENSE_FILE=<%= scope.lookupvar('ifort::ifort_lic_file_path') %> +