summaryrefslogtreecommitdiffstats
path: root/ansible_collections/netapp_eseries/santricity/vars/setupSynopsysDetect.groovy
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_collections/netapp_eseries/santricity/vars/setupSynopsysDetect.groovy')
-rw-r--r--ansible_collections/netapp_eseries/santricity/vars/setupSynopsysDetect.groovy15
1 files changed, 15 insertions, 0 deletions
diff --git a/ansible_collections/netapp_eseries/santricity/vars/setupSynopsysDetect.groovy b/ansible_collections/netapp_eseries/santricity/vars/setupSynopsysDetect.groovy
new file mode 100644
index 00000000..f5eed5c4
--- /dev/null
+++ b/ansible_collections/netapp_eseries/santricity/vars/setupSynopsysDetect.groovy
@@ -0,0 +1,15 @@
+
+def call(Map options = [:], String synopsysDetectVersion) {
+ options.synopsysDir = options.synopsysDir ?: "/tmp/synopsys-detect-air-gap/${synopsysDetectVersion}"
+ if (new File(options.synopsysDir).exists()) {
+ echo "No need to fetch synopsys-${synopsysDetectVersion}, directory exists ${options.synopsysDir}"
+ return
+ }
+
+ sh """
+ wget -qN http://esgweb.eng.netapp.com/~blucas/packages/synopsys-detect-${synopsysDetectVersion}-air-gap.zip -O synopsys-detect.zip
+ mkdir -p ${options.synopsysDir}
+ unzip -q -d ${options.synopsysDir} -u synopsys-detect.zip
+ rm -f synopsys-detect.zip
+ """
+}