File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 2424 args :
2525 executable : /bin/bash
2626
27+ - name : Ensure API code directory exists
28+ ansible.builtin.stat :
29+ path : /home/adminuser/ansible-setup/src/movie-analyst-api
30+ register : api_dir
31+
32+ - name : Fail if API code not found
33+ ansible.builtin.fail :
34+ msg : " API source code not found in /home/adminuser/ansible-setup/src/movie-analyst-api"
35+ when : not api_dir.stat.exists
36+
2737 - name : Install app dependencies
2838 shell : |
2939 export NVM_DIR="$HOME/.nvm"
3040 source "$NVM_DIR/nvm.sh"
31- cd {{ app_path }}
41+ cd /home/adminuser/ansible-setup/src/movie-analyst-api
3242 npm install
3343 args :
3444 executable : /bin/bash
45+
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ scp -i "${SSH_KEY_LOCAL}" "${API_PLAYBOOK_LOCAL}" "${INVENTORY_LOCAL}" "${JUMP_U
2626
2727# [2/4] Copiar código fuente de la API
2828echo " [2/4] Copiando código fuente de la API..."
29- scp -r -i " $SSH_KEY_LOCAL " ./src/movie-analyst-api " $JUMPBOX_USER @$JUMPBOX_HOST :/home/$JUMPBOX_USER /ansible-setup/src/"
29+ scp -i " $SSH_KEY_LOCAL " -r ./src/movie-analyst-api " $JUMPBOX_USER @$JUMPBOX_HOST :/home/$JUMPBOX_USER /ansible-setup/src/"
30+
3031
3132# === STEP 2: Upload systemd template ===
3233echo " [3/4] Uploading systemd template..."
You can’t perform that action at this time.
0 commit comments