From 39e650f59d6742d587c7795dc8f89454648a8bf1 Mon Sep 17 00:00:00 2001
From: "gioacchino.vino" <gioacchino.vino@infn.it>
Date: Wed, 6 Dec 2023 11:55:50 +0100
Subject: [PATCH] Removed variable container Python script path

---
 defaults/main.yml |  1 -
 tasks/2-scan.yml  | 10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/defaults/main.yml b/defaults/main.yml
index d4696e6..f2510d4 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -3,6 +3,5 @@
 paas_ci_orchestrator_url: https://paas.cloud.infn.it/orchestrator
 paas_ci_iam_group: admins/cicd 
 paas_ci_workdir: "{{ lookup('env','WORKSPACE') }}"        
-paas_ci_scan_script_path: "{{ paas_ci_workdir }}/scan.py"
 n_timeout_ticks: 60
 endpoints_to_scan: None
\ No newline at end of file
diff --git a/tasks/2-scan.yml b/tasks/2-scan.yml
index 585ee0d..bc4d673 100644
--- a/tasks/2-scan.yml
+++ b/tasks/2-scan.yml
@@ -9,21 +9,21 @@
 - name: Copy scan script
   copy: 
     src: files/scan.py
-    dest: "{{ paas_ci_scan_script_path }}"
+    dest: "{{ paas_ci_workdir + '/scan.py }}"
 
 - name: Copy utilities module
   copy: 
     src: files/utilities.py
-    dest: "{{ paas_ci_scan_script_path }}"
+    dest: "{{ paas_ci_workdir + '/utilities.py }}"
 
 - name: Copy gvm_library module
   copy: 
     src: files/gvm_library.py
-    dest: "{{ paas_ci_scan_script_path }}"
+    dest: "{{ paas_ci_workdir + '/gvm_library.py }}"
 
 - name: Adding execution permission to scan script
   file: 
-    dest: "{{ paas_ci_scan_script_path + '/scan.py' }} "
+    dest: "{{ paas_ci_workdir + '/scan.py }}"
     mode: a+x 
 
 - name: Show dep json file
@@ -32,7 +32,7 @@
   with_items: "{{ paas_ci_workdir + '/dep.json'}}"
 
 - name:  Run scan
-  command: "{{ paas_ci_scan_script_path }}/scan.py --endpoint-keys {{ paas_ci_test.endpoints_to_scan }} --dep-json {{ paas_ci_workdir + '/dep.json'}} --output-dir {{ paas_ci_workdir }}" 
+  command: "{{ paas_ci_workdir + '/scan.py }} --endpoint-keys {{ paas_ci_test.endpoints_to_scan }} --dep-json {{ paas_ci_workdir + '/dep.json'}} --output-dir {{ paas_ci_workdir }}" 
   register: scan_output
 
 - name: Scan logs
-- 
GitLab