This commit is contained in:
thienqb123456
2025-03-04 10:37:14 +07:00
parent f94804e277
commit 9d15ed743a
+5 -12
View File
@@ -41,23 +41,16 @@
} else { } else {
Write-Output "NOT_FOUND" Write-Output "NOT_FOUND"
} }
register: active_path register: site_path
- name: Debug output - name: Set fact for site path
debug: set_fact:
msg: "Site path: {{ active_path.stdout }}" active_path: "{{ site_path.stdout_lines[0] }}"
- name: Fail if site does not exist - name: Fail if site does not exist
fail: fail:
msg: "IIS site {{ iis_site_name }} not found!" msg: "IIS site {{ iis_site_name }} not found!"
when: active_path.stdout == "NOT_FOUND" when: active_path == "NOT_FOUND"
# Chuẩn hóa giá trị của active_path
- name: Normalize active_path
set_fact:
active_path: "{{ active_path.stdout | trim }}"
- debug:
var: active_path
# Chọn môi trường Blue hoặc Green để deploy # Chọn môi trường Blue hoặc Green để deploy
- name: Set target deployment environment - name: Set target deployment environment