v3 #1
@@ -1,4 +1,4 @@
|
||||
- name: Deploy Backend for Project Acp, Portal
|
||||
- name: Deploy Backend for Project Portal
|
||||
hosts: "{{ deploy_env }}-{{project_name}}-backend"
|
||||
vars:
|
||||
portal_name: "{{ portal_name }}"
|
||||
|
||||
@@ -24,19 +24,17 @@
|
||||
debug:
|
||||
var: artifact_name
|
||||
|
||||
- name: Set environment variable for IIS App Pool
|
||||
hosts: windows_servers
|
||||
tasks:
|
||||
- name: Thiết lập ASPNETCORE_ENVIRONMENT cho App Pool
|
||||
win_shell: |
|
||||
$appPoolName = "{{ iis_app_pool }}"
|
||||
$envVarName = "ASPNETCORE_ENVIRONMENT"
|
||||
$envVarValue = "{{ aspnetcore_environtment }}"
|
||||
$appPool = Get-Item "IIS:\AppPools\$appPoolName"
|
||||
$appPool.EnvironmentVariables[$envVarName] = $envVarValue
|
||||
$appPool | Set-Item
|
||||
args:
|
||||
executable: powershell.exe
|
||||
- name: Set registry key for IIS App Pool environment variable
|
||||
win_regedit:
|
||||
path: "HKLM:\\SYSTEM\\CurrentControlSet\\Services\\W3SVC\\AppPools\\{{ iis_app_pool }}\\Environment"
|
||||
name: "TEST_ENV"
|
||||
type: string
|
||||
data: "{{ aspnetcore_environtment }}"
|
||||
|
||||
- name: Khởi động lại App Pool (hoặc IIS) để áp dụng
|
||||
win_iis_webapppool:
|
||||
name: "{{ iis_app_pool }}"
|
||||
state: restarted
|
||||
|
||||
#Lấy đường dẫn vật lý của iis site
|
||||
- name: Get the physical path of the current IIS site
|
||||
|
||||
Reference in New Issue
Block a user