v3 #1
@@ -41,11 +41,6 @@
|
|||||||
debug:
|
debug:
|
||||||
msg: "IIS site {{ iis_site_name }} exists!"
|
msg: "IIS site {{ iis_site_name }} exists!"
|
||||||
|
|
||||||
- name: Set ASPNETCORE_ENVIRONMENT for IIS site if different
|
|
||||||
win_shell: |
|
|
||||||
Import-Module WebAdministration
|
|
||||||
Add-WebConfigurationProperty -pspath "MACHINE/WEBROOT/APPHOST/{{ iis_site_name }}" -filter "system.webServer/aspNetCore/environmentVariables" -name "." -value @{name="ASPNETCORE_ENVIRONMENT"; value="{{ aspnetcore_environment }}"}
|
|
||||||
|
|
||||||
#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
|
||||||
win_shell: |
|
win_shell: |
|
||||||
|
|||||||
@@ -3,6 +3,14 @@
|
|||||||
name: "{{ iis_site_name }}"
|
name: "{{ iis_site_name }}"
|
||||||
physical_path: "{{ target_path }}"
|
physical_path: "{{ target_path }}"
|
||||||
|
|
||||||
|
- name: Set ASPNETCORE_ENVIRONMENT for IIS site
|
||||||
|
win_shell: |
|
||||||
|
Import-Module WebAdministration
|
||||||
|
Add-WebConfigurationProperty -pspath "MACHINE/WEBROOT/APPHOST/{{ iis_site_name }}" `
|
||||||
|
-filter "system.webServer/aspNetCore/environmentVariables" 1
|
||||||
|
-name "." 1
|
||||||
|
-value @{name="ASPNETCORE_ENVIRONMENT"; value="{{ aspnetcore_environment }}"}
|
||||||
|
|
||||||
# - name: Restart IIS site to apply changes
|
# - name: Restart IIS site to apply changes
|
||||||
# win_iis_website:
|
# win_iis_website:
|
||||||
# name: "{{ iis_site_name }}"
|
# name: "{{ iis_site_name }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user