Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purpleidea-puppetmatlab
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rane Squires
purpleidea-puppetmatlab
Commits
56b8204d
Commit
56b8204d
authored
Jul 24, 2019
by
Rane Squires
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change name var references to custom variable name_
parent
f027e327
Pipeline
#75
canceled with stages
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
manifests/install.pp
manifests/install.pp
+19
-16
No files found.
manifests/install.pp
View file @
56b8204d
...
...
@@ -18,7 +18,10 @@ class matlab::install( # $namevar matlab release version
#$vardir = $::matlab::vardir::module_vardir # with trailing slash
$vardir
=
"/opt/matlab_install"
$install_destination
=
"
${prefix}
/MATLAB/
${name}
"
# individual install name
$name_
=
'R2019a'
$install_destination
=
"
${prefix}
/MATLAB/
${name_}
"
# does user accept license ?
$agree
=
$licenseagree
?
{
...
...
@@ -38,7 +41,7 @@ class matlab::install( # $namevar matlab release version
}
# make folder to mount on
file
{
"/mnt/matlab-
${name}
"
:
file
{
"/mnt/matlab-
${name
_
}
"
:
ensure
=>
directory
,
# make sure this is a directory
recurse
=>
false
,
# don't manage directory
purge
=>
false
,
# don't purge unmanaged files
...
...
@@ -53,50 +56,50 @@ class matlab::install( # $namevar matlab release version
# get iso to mountUpdate Puppetfile
# TODO: since there seem to be different iso's for each version, maybe
# we should add a unique identifier based on the $iso variable here.
file
{
"
${vardir}
/MATHWORKS-
${name}
.iso"
:
file
{
"
${vardir}
/MATHWORKS-
${name
_
}
.iso"
:
ensure
=>
present
,
owner
=>
root
,
group
=>
root
,
mode
=>
'0600'
,
# u=rw,go=
backup
=>
false
,
# don't backup to filebucket!
source
=>
$iso
,
alias
=>
"matlab_iso.
${name}
"
,
require
=>
File
[
"/mnt/matlab-
${name}
"
],
alias
=>
"matlab_iso.
${name
_
}
"
,
require
=>
File
[
"/mnt/matlab-
${name
_
}
"
],
}
# mount!
# TODO: replace this mount with an exec that has an:
# onlyif => the_binary_is_not_installed so that a normal machine
# doesn't need to have the iso mounted all the time...
mount
{
"/mnt/matlab-
${name}
"
:
mount
{
"/mnt/matlab-
${name
_
}
"
:
ensure
=>
mounted
,
atboot
=>
true
,
device
=>
"
${vardir}
/MATHWORKS-
${name}
.iso"
,
device
=>
"
${vardir}
/MATHWORKS-
${name
_
}
.iso"
,
fstype
=>
'iso9660'
,
options
=>
'loop,ro'
,
dump
=>
'0'
,
# fs_freq: 0 to skip file system dumps
pass
=>
'0'
,
# fs_passno: 0 to skip fsck on boot
alias
=>
"matlab_mount.
${name}
"
,
require
=>
[
File
[
"matlab_iso.
${name}
"
]],
alias
=>
"matlab_mount.
${name
_
}
"
,
require
=>
[
File
[
"matlab_iso.
${name
_
}
"
]],
}
# build installer parameters file in our scratch directory
file
{
"
${vardir}
/installer_input.txt.
${name}
"
:
file
{
"
${vardir}
/installer_input.txt.
${name
_
}
"
:
ensure
=>
present
,
owner
=>
root
,
group
=>
root
,
mode
=>
'0600'
,
# u=rw,go=r
require
=>
Mount
[
"matlab_mount.
${name}
"
],
require
=>
Mount
[
"matlab_mount.
${name
_
}
"
],
content
=>
epp
(
'matlab/installer_input.txt.epp'
),
alias
=>
"matlab_input.
${name}
"
,
alias
=>
"matlab_input.
${name
_
}
"
,
}
# install matlab
exec
{
"/mnt/matlab-
${name
}
/install -inputFile
${vardir}
/installer_input.txt.
${name
}
"
:
exec
{
"/mnt/matlab-
${name
_}
/install -inputFile
${vardir}
/installer_input.txt.
${name_
}
"
:
logoutput
=>
on_failure
,
creates
=>
$install_destination
,
# when this folder appears, we assume it got installed
require
=>
File
[
"matlab_input.
${name}
"
],
alias
=>
"matlab_install.
${name}
"
,
require
=>
File
[
"matlab_input.
${name
_
}
"
],
alias
=>
"matlab_install.
${name
_
}
"
,
}
# create 'licenses' directory
...
...
@@ -109,7 +112,7 @@ class matlab::install( # $namevar matlab release version
group
=>
root
,
mode
=>
'0644'
,
backup
=>
false
,
# don't backup to filebucket
require
=>
Exec
[
"matlab_install.
${name}
"
],
require
=>
Exec
[
"matlab_install.
${name
_
}
"
],
}
# copy over license file to activate
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment