Update azure_rm_webapp related document (#59027)

* Update azure_rm_webapp related document

* resolve format error

* remove whitespace

* update new

* updated according by comments

* update new according by comments

* add support time
This commit is contained in:
Fred-sun 2019-08-09 19:30:57 +08:00 committed by ansibot
parent dbd082efe4
commit f088621610
2 changed files with 150 additions and 68 deletions

View file

@ -17,7 +17,7 @@ DOCUMENTATION = '''
---
module: azure_rm_webapp
version_added: "2.7"
short_description: Manage Web App instance.
short_description: Manage Web App instances
description:
- Create, update and delete instance of Web App.
@ -38,15 +38,15 @@ options:
plan:
description:
- App service plan. Required for creation.
- It can 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). Name 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.
- Can 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), name 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 linux 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 Linux 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 true web app hostname is not registered with DNS on creation.
- Whether or not the 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 state of the Web App.
- State 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

View file

@ -19,7 +19,7 @@ module: azure_rm_webapp_facts
version_added: "2.7"
short_description: Get azure web app facts.
short_description: Get Azure web app facts
description:
- Get facts for a specific web app or all web app in a resource group, or all web app in current subscription.
@ -44,7 +44,7 @@ extends_documentation_fragment:
- azure
author:
- "Yunge Zhu (@yungezz)"
- Yunge Zhu (@yungezz)
'''
EXAMPLES = '''
@ -66,13 +66,14 @@ EXAMPLES = '''
RETURN = '''
webapps:
description: List of web apps.
description:
- List of web apps.
returned: always
type: complex
contains:
id:
description:
- Id of the web app.
- ID of the web app.
returned: always
type: str
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Web/sites/myWebApp
@ -81,6 +82,7 @@ webapps:
- Name of the web app.
returned: always
type: str
sample: winwebapp1
resource_group:
description:
- Resource group of the web app.
@ -92,58 +94,131 @@ webapps:
- Location of the web app.
returned: always
type: str
sample: eastus
plan:
description:
- Id of app service plan used by the web app.
- ID of app service plan used by the web app.
returned: always
type: str
sample: /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/myResourceGroup/providers/Microsoft.Web/serverfarms/myAppServicePlan
app_settings:
description:
- App settings of the application. Only returned when web app has app settings.
type: complex
returned: always
type: dict
sample: {
"testkey": "testvalue",
"testkey2": "testvalue2"
}
frameworks:
description:
- Frameworks of the application. Only returned when web app has frameworks.
type: complex
returned: always
type: list
sample: [
{
"name": "net_framework",
"version": "v4.0"
},
{
"name": "java",
"settings": {
"java_container": "tomcat",
"java_container_version": "8.5"
},
"version": "1.7"
},
{
"name": "php",
"version": "5.6"
}
]
availability_state:
description: Availability of this web app.
description:
- Availability of this web app.
returned: always
type: str
sample: Normal
default_host_name:
description: Host name of the web app.
description:
- Host name of the web app.
returned: always
type: str
sample: vxxisurg397winapp4.azurewebsites.net
enabled:
description: Indicates the web app enabled or not.
description:
- Indicates the web app enabled or not.
returned: always
type: bool
sample: true
enabled_host_names:
description: Enabled host names of the web app.
description:
- Enabled host names of the web app.
returned: always
type: list
sample: [
"vxxisurg397winapp4.azurewebsites.net",
"vxxisurg397winapp4.scm.azurewebsites.net"
]
host_name_ssl_states:
description: SSL state per host names of the web app.
description:
- SSL state per host names of the web app.
returned: always
type: list
sample: [
{
"hostType": "Standard",
"name": "vxxisurg397winapp4.azurewebsites.net",
"sslState": "Disabled"
},
{
"hostType": "Repository",
"name": "vxxisurg397winapp4.scm.azurewebsites.net",
"sslState": "Disabled"
}
]
host_names:
description: Host names of the web app.
description:
- Host names of the web app.
returned: always
type: list
sample: [
"vxxisurg397winapp4.azurewebsites.net"
]
outbound_ip_addresses:
description: Outbound ip address of the web app.
description:
- Outbound IP address of the web app.
returned: always
type: str
sample: "40.71.11.131,40.85.166.200,168.62.166.67,137.135.126.248,137.135.121.45"
ftp_publish_url:
description: Publishing url of the web app when deployment type is FTP.
description:
- Publishing URL of the web app when deployment type is FTP.
returned: always
type: str
sample: ftp://xxxx.ftp.azurewebsites.windows.net
state:
description: State of the web app. eg. running.
description:
- State of the web app.
returned: always
type: str
sample: running
publishing_username:
description: Publishing profile user name.
returned: only when I(return_publish_profile) is True.
description:
- Publishing profile user name.
returned: only when I(return_publish_profile=True).
type: str
sample: "$vxxisuRG397winapp4"
publishing_password:
description: Publishing profile password.
returned: only when I(return_publish_profile) is True.
description:
- Publishing profile password.
returned: only when I(return_publish_profile=True).
type: str
sample: "uvANsPQpGjWJmrFfm4Ssd5rpBSqGhjMk11pMSgW2vCsQtNx9tcgZ0xN26s9A"
tags:
description: Tags assigned to the resource. Dictionary of string:string pairs.
description:
- Tags assigned to the resource. Dictionary of string:string pairs.
returned: always
type: dict
sample: { tag1: abc }
'''