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