@ -17,7 +17,7 @@ DOCUMENTATION = '''
- - -
module : azure_rm_webapp
version_added : " 2.7 "
short_description : Manage Web App instance .
short_description : Manage Web App instance s
description :
- Create , update and delete instance of Web App .
@ -38,15 +38,15 @@ options:
plan :
description :
- App service plan . Required for creation .
- It c an be name of existing app service plan in same resource group as web app .
- " It can be resource id of existing app service plan. eg.,
/ subscriptions / < subs_id > / resourceGroups / < resource_group > / providers / Microsoft . Web / serverFarms / < plan_name > "
- It can be a dict which contains C ( name ) , C ( resource_group ) , C ( sku ) , C ( is_linux ) and C ( number_of_workers ) .
- C ( name ) . N ame of app service plan .
- C ( resource_group ) . Resource group name of app service plan .
- C ( sku ) . SKU of app service plan . For allowed sku , please refer to U ( https : / / azure . microsoft . com / en - us / pricing / details / app - service / linux / ) .
- C ( is_linux ) . Indicates Linux app service plan . type bool . default False .
- C ( number_of_workers ) . Number of workers .
- C an be name of existing app service plan in same resource group as web app .
- Can be the resource ID of an existing app service plan . For example
/ subscriptions / < subs_id > / resourceGroups / < resource_group > / providers / Microsoft . Web / serverFarms / < plan_name > .
- Can be a dict containing five parameters , defined below .
- C ( name ) , n ame of app service plan .
- C ( resource_group ) , resource group of the app service plan .
- C ( sku ) , SKU of app service plan , allowed values listed on U ( https : / / azure . microsoft . com / en - us / pricing / details / app - service / linux / ) .
- C ( is_linux ) , whether or not the app service plan is Linux . defaults to C ( False ) .
- C ( number_of_workers ) , number of workers for app service plan .
frameworks :
description :
@ -57,8 +57,10 @@ options:
description :
- Name of the framework .
- Supported framework list for Windows web app and Linux web app is different .
- For Windows web app , supported names ( June 2018 ) java , net_framework , php , python , node . Multiple framework can be set at same time .
- For Linux web app , supported names ( June 2018 ) java , ruby , php , dotnetcore , node . Only one framework can be set .
- Windows web apps support C ( java ) , C ( net_framework ) , C ( php ) , C ( python ) , and C ( node ) from June 2018.
- Windows web apps support multiple framework at the same time .
- Linux web apps support C ( java ) , C ( ruby ) , C ( php ) , C ( dotnetcore ) , and C ( node ) from June 2018.
- Linux web apps support only one framework .
- Java framework is mutually exclusive with others .
choices :
- java
@ -71,45 +73,52 @@ options:
version :
description :
- Version of the framework . For Linux web app supported value , see U ( https : / / aka . ms / linux - stacks ) for more info .
- net_framework supported value sample , ' v4.0 ' for . NET 4.6 and ' v3.0 ' for . NET 3.5 .
- php supported value sample , 5.5 , 5.6 , 7.0 .
- python supported value sample , e. g . , 5.5 , 5.6 , 7.0 .
- node supported value sample , 6.6 , 6.9 .
- dotnetcore supported value sample , 1.0 , 1 , 1 , 1.2 .
- ruby supported value sample , 2.3 .
- java supported value sample , 1.8 , 1.9 for windows web app . 8 for l inux web app .
- C( net_framework) supported value sample , C ( v4 .0 ) for . NET 4.6 and C ( v3 .0 ) for . NET 3.5 .
- C( php) supported value sample , C ( 5.5 ) , C ( 5.6 ) , C ( 7.0 ) .
- C( python) supported value sample , C( 5.5 ) , C ( 5.6 ) , C ( 7.0 ) .
- C( node) supported value sample , C ( 6.6 ) , C ( 6.9 ) .
- C( dotnetcore) supported value sample , C ( 1.0 ) , C ( 1.1 ) , C ( 1.2 ) .
- C( ruby) supported value sample , C ( 2.3 ) .
- C( java) supported value sample , C ( 1.9 ) for Windows web app . C ( 1.8 ) for L inux web app .
settings :
description :
- List of settings of the framework .
suboptions :
java_container :
description : Name of Java container . This is supported by specific framework C ( java ) only . e . g . Tomcat , Jetty .
description :
- Name of Java container .
- Supported only when I ( frameworks = java ) . Sample values C ( Tomcat ) , C ( Jetty ) .
java_container_version :
description :
- Version of Java container . This is supported by specific framework C ( java ) only .
- For Tomcat , e . g . 8.0 , 8.5 , 9.0 . For Jetty , e . g . 9.1 , 9.3 .
- Version of Java container .
- Supported only when I ( frameworks = java ) .
- Sample values for C ( Tomcat ) , C ( 8.0 ) , C ( 8.5 ) , C ( 9.0 ) . For C ( Jetty , ) , C ( 9.1 ) , C ( 9.3 ) .
container_settings :
description : Web app container settings .
description :
- Web app container settings .
suboptions :
name :
description : Name of container . eg . " imagename:tag "
description :
- Name of container , for example C ( imagename : tag ) .
registry_server_url :
description : Container registry server url . eg . mydockerregistry . io
description :
- Container registry server URL , for example C ( mydockerregistry . io ) .
registry_server_user :
description : The container registry server user name .
description :
- The container registry server user name .
registry_server_password :
description :
- The container registry server password .
scm_type :
description :
- Repository type of deployment source . Eg . LocalGit , GitHub .
- Please see U ( https : / / docs . microsoft . com / en - us / rest / api / appservice / webapps / createorupdate #scmtype) for more info .
- Repository type of deployment source , for example C ( LocalGit ) , C ( GitHub ) .
- List of supported values maintained at U ( https : / / docs . microsoft . com / en - us / rest / api / appservice / webapps / createorupdate #scmtype) .
deployment_source :
description :
- Deployment source for git
- Deployment source for git .
suboptions :
url :
description :
@ -121,12 +130,11 @@ options:
startup_file :
description :
- The web ' s startup file.
- This only applies for linux web app .
- Used only for Linux web apps .
client_affinity_enabled :
description :
- " True to enable client affinity; False to stop sending session affinity cookies, which route client requests in the
same session to the same instance . "
- Whether or not to send session affinity cookies , which route client requests in the same session to the same instance .
type : bool
default : True
@ -137,12 +145,12 @@ options:
dns_registration :
description :
- If tru e web app hostname is not registered with DNS on creation .
- Whether or not th e web app hostname is registered with DNS on creation . Set to C ( false ) to register .
type : bool
skip_custom_domain_verification :
description :
- If true , custom ( non * . azurewebsites . net ) domains associated with web app are not verified .
- Whether or not to skip verification of custom ( non * . azurewebsites . net ) domains associated with web app . Set to C ( true ) to skip .
type : bool
ttl_in_seconds :
@ -170,7 +178,7 @@ options:
state :
description :
- Assert the s tate of the Web App .
- S tate of the Web App .
- Use C ( present ) to create or update a Web App and C ( absent ) to delete it .
default : present
choices :
@ -182,7 +190,7 @@ extends_documentation_fragment:
- azure_tags
author :
- " Yunge Zhu (@yungezz) "
- Yunge Zhu ( @yungezz )
'''
@ -283,12 +291,11 @@ EXAMPLES = '''
RETURN = '''
azure_webapp :
description : Id of current web app .
description :
- ID of current web app .
returned : always
type : dict
sample : {
" id " : " /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp "
}
type : str
sample : " /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp "
'''
import time