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 {
Write-Output "NOT_FOUND"
}
register: active_path
register: site_path
- name: Debug output
debug:
msg: "Site path: {{ active_path.stdout }}"
- name: Set fact for site path
set_fact:
active_path: "{{ site_path.stdout_lines[0] }}"
- name: Fail if site does not exist
fail:
msg: "IIS site {{ iis_site_name }} not found!"
when: active_path.stdout == "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
when: active_path == "NOT_FOUND"
# Chọn môi trường Blue hoặc Green để deploy
- name: Set target deployment environment