Files
nsg_ansible/roles/iis_utils/tasks/set_target_path.yml
T
2025-03-04 17:13:09 +07:00

16 lines
577 B
YAML

- name: Validate variables
assert:
that:
- green_path is defined and green_path | length > 0
- blue_path is defined and blue_path | length > 0
- active_path is defined and active_path | length > 0
fail_msg: "Thiếu hoặc rỗng biến cần thiết để set_target_path!"
# Chọn môi trường Blue hoặc Green để deploy
- name: Set target deployment environment
set_fact:
target_path: "{{ green_path if active_path == blue_path else blue_path }}" #lấy ra đường dẫn thư mục cần deploy
- debug:
var: target_path