diff --git a/inventory/uat/host_vars/acp-backend.yml b/inventory/uat/host_vars/acp-backend.yml index bb248ab..67c927d 100644 --- a/inventory/uat/host_vars/acp-backend.yml +++ b/inventory/uat/host_vars/acp-backend.yml @@ -1,5 +1,6 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "api-acp-2025" +app_pool_name: "api-acp-2025" blue_path: "C:\\deploy\\vpress\\acp\\be\\blue" green_path: "C:\\deploy\\vpress\\acp\\be\\green" diff --git a/inventory/uat/host_vars/acp-frontend.yml b/inventory/uat/host_vars/acp-frontend.yml index 293a6c6..41ec78b 100644 --- a/inventory/uat/host_vars/acp-frontend.yml +++ b/inventory/uat/host_vars/acp-frontend.yml @@ -1,4 +1,5 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "uat-acp.vpress.vn" +app_pool_name: "uat-acp.vpress.vn" blue_path: "C:\\deploy\\vpress\\acp\\fe\\blue" green_path: "C:\\deploy\\vpress\\acp\\fe\\green" \ No newline at end of file diff --git a/inventory/uat/host_vars/hnt-portal-backend.yml b/inventory/uat/host_vars/hnt-portal-backend.yml index 2e401d3..9af33ce 100644 --- a/inventory/uat/host_vars/hnt-portal-backend.yml +++ b/inventory/uat/host_vars/hnt-portal-backend.yml @@ -1,5 +1,6 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "api-portal2-2025.vpress.vn" +app_pool_name: "api-portal2-2025.vpress.vn" blue_path: "C:\\deploy\\vpress\\portal\\be\\hnt\\blue" green_path: "C:\\deploy\\vpress\\portal\\be\\hnt\\green" diff --git a/inventory/uat/host_vars/hnt-portal-frontend.yml b/inventory/uat/host_vars/hnt-portal-frontend.yml index a7aa4f7..5276295 100644 --- a/inventory/uat/host_vars/hnt-portal-frontend.yml +++ b/inventory/uat/host_vars/hnt-portal-frontend.yml @@ -1,4 +1,6 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "uat-portal2" +app_pool_name: "uat-portal2" + blue_path: "C:\\deploy\\vpress\\portal\\fe\\hnt\\blue" green_path: "C:\\deploy\\vpress\\portal\\fe\\hnt\\green" \ No newline at end of file diff --git a/inventory/uat/host_vars/hnt-resource-backend.yml b/inventory/uat/host_vars/hnt-resource-backend.yml index 0b614cb..5150762 100644 --- a/inventory/uat/host_vars/hnt-resource-backend.yml +++ b/inventory/uat/host_vars/hnt-resource-backend.yml @@ -1,5 +1,7 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "resource.vpress.vn" +app_pool_name: "resource.vpress.vn" + blue_path: "C:\\deploy\\vpress\\resource\\hnt\\blue" green_path: "C:\\deploy\\vpress\\resource\\hnt\\green" diff --git a/inventory/uat/host_vars/ktdt-portal-backend.yml b/inventory/uat/host_vars/ktdt-portal-backend.yml index 9bd9a43..73a5beb 100644 --- a/inventory/uat/host_vars/ktdt-portal-backend.yml +++ b/inventory/uat/host_vars/ktdt-portal-backend.yml @@ -1,5 +1,7 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "api-portal-2025" +app_pool_name: "api-portal-2025" + blue_path: "C:\\deploy\\vpress\\portal\\be\\ktdt\\blue" green_path: "C:\\deploy\\vpress\\portal\\be\\ktdt\\green" diff --git a/inventory/uat/host_vars/ktdt-portal-frontend.yml b/inventory/uat/host_vars/ktdt-portal-frontend.yml index cb452ba..3e31022 100644 --- a/inventory/uat/host_vars/ktdt-portal-frontend.yml +++ b/inventory/uat/host_vars/ktdt-portal-frontend.yml @@ -1,4 +1,6 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "uat-portal.vpress.vn" +app_pool_name: "uat-portal.vpress.vn" + blue_path: "C:\\deploy\\vpress\\portal\\fe\\ktdt\\blue" green_path: "C:\\deploy\\vpress\\portal\\fe\\ktdt\\green" \ No newline at end of file diff --git a/inventory/uat/host_vars/ktdt-resource-backend.yml b/inventory/uat/host_vars/ktdt-resource-backend.yml index e9b2918..da99fbb 100644 --- a/inventory/uat/host_vars/ktdt-resource-backend.yml +++ b/inventory/uat/host_vars/ktdt-resource-backend.yml @@ -1,5 +1,7 @@ temp_dir: "C:\\deploy\\vpress\\temp" iis_site_name: "resource.vpress.vn" +app_pool_name: "resource.vpress.vn" + blue_path: "C:\\deploy\\vpress\\resource\\ktdt\\blue" green_path: "C:\\deploy\\vpress\\resource\\ktdt\\green" diff --git a/roles/deploy-be-acp/tasks/main.yml b/roles/deploy-be-acp/tasks/main.yml index 5eef374..923ad83 100644 --- a/roles/deploy-be-acp/tasks/main.yml +++ b/roles/deploy-be-acp/tasks/main.yml @@ -23,6 +23,12 @@ name: iis_utils tasks_from: update_iis_physical_path.yml +- name: start_iis_app_pool + import_role: + name: iis_utils + tasks_from: start_iis_app_pool.yml + + - name: set_site_aspnetcore_environment import_role: name: iis_utils diff --git a/roles/iis_utils/tasks/start_iis_app_pool.yml b/roles/iis_utils/tasks/start_iis_app_pool.yml new file mode 100644 index 0000000..e1b9e08 --- /dev/null +++ b/roles/iis_utils/tasks/start_iis_app_pool.yml @@ -0,0 +1,11 @@ +- name: Validate variables + assert: + that: + - app_pool_name is defined and app_pool_name | length > 0 + fail_msg: "Thiếu hoặc rỗng biến cần thiết để start_iis_app_pool.yml!" + +# Start app pool +- name: Start IIS App Pool + win_iis_webapppool: + name: "{{ app_pool_name }}" + state: started \ No newline at end of file