From c3545b785b6b2e55b77443571171380de19f4e0f Mon Sep 17 00:00:00 2001
From: omidshj <omid.shj@gmail.com>
Date: Tue, 4 Feb 2025 21:54:52 +0330
Subject: [PATCH] Update build inception.yml

---
 build inception.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/build inception.yml b/build inception.yml
index 59ea94b..6735704 100644
--- a/build inception.yml	
+++ b/build inception.yml	
@@ -1,6 +1,8 @@
 ---
 - name: update inception
   hosts: all
+  vars:
+    app_dir: "{{ app_dir | default('/root/code/inception') }}"
   tasks:
   # - name: Change to the app directory and update the repository
   #   git:
@@ -9,14 +11,14 @@
   #     version: master
   #   register: git_result
   - name: Go to the application directory
-    command: chdir=/root/code/inception git pull origin master
+    command: chdir={{ app_dir }} git pull origin master
     register: git_result
 
   - name: Build docker image if there were changes
     docker_image:
       source: build
       build:
-        path: /root/code/inception
+        path: "{{ app_dir }}""
       name: inception
       tag: "{{semaphore_vars.task_details.target_version}}"
     when: git_result.changed
\ No newline at end of file