bigip_as3_deploy – Manages AS3 declarations sent to BIG-IP¶
New in version 1.0.0.
Parameters¶
Parameter | Choices/Defaults | Configuration | Comments | |
---|---|---|---|---|
content
raw
|
The declaration to be configured on the system.
This parameter is most often used with the
file or template lookup plugins. Refer to the examples section for correct usage.For anything advanced or with formatting, consider using the
template lookup.Additionally, this can be used for specifying application service configurations directly in YAML. However that is not an encouraged practice and, if used at all, should only be used for the absolute smallest of configurations to prevent your Playbooks from becoming too large.
If your
content includes encrypted values (such as ciphertexts, passphrases, etc), the returned changed value will always be true.If you are using the
to_nice_json filter, it causes this module to fail because the purpose of that filter is to format the JSON to be human-readable and this process includes inserting extra characters that break JSON validators. |
|||
controls
dictionary
added in 3.9.0 |
Optional controls configuration.
The controls options can also be specified in the as3 declaration itself.
Do not specify the controls options in both the as3 declaration and the module parameters, as this will raise an error.
|
|||
dry_run
boolean
|
|
If
true , the declaration is not deployed to the device. |
||
log_level
string
|
|
Controls the amount of detail in logs produced while configuring the tenant.
|
||
trace
boolean
|
|
If
true , BIG-IP AS3 creates a detailed trace of the configuration process for this Tenant for subsequent analysis. |
||
trace_response
boolean
|
|
If set to
true , the response will contain the trace files. |
||
user_agent
string
|
User Agent information to include in TEEM report.
|
|||
state
string
|
|
When
state is present , ensures the declaration is exists.When
state is absent , ensures the declaration is removed. |
||
tenant
string
|
tenant is mandatory for Per-Application Deployment
An AS3 tenant you want to manage.
A value of
all when state is absent removes all AS3 declarations from the device. |
|||
timeout
integer
|
Default: 300
|
The amount of time to wait for the AS3 async interface to complete its task, in seconds.
The accepted value range is between
10 and 1800 seconds. |
Notes¶
Note
- For Traditional Deployment should contian the Tenant information inside it. Traditional Deployment dosen’t depend on
perAppDeploymentAllowed
value. - For Per-Application Deployment
perAppDeploymentAllowed
should be set to true. Per-Application declaration shouldn’t contain Tenant information inside it. Per-Application deployments is supported from AS3 versions>=3.50.0 Tenant parameter is mandatory for Per-Application Deployments More infotmation can be found here https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/userguide/per-app-declarations.html - Regarding the controls parameter, in this document, https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/refguide/as3-api.html#query-parameters-for-controls-objects, it is mentioned that controls parameters specified in the url as query parameters will override the controls parameters specified in the declaration, but due to a bug that behaviour is not seen, so it is recommended that the user should specify controls options either in the module parameters or in the AS3 declaration. Note that using the controls parameter in this module uses url query parameters behind the scenes.
Examples¶
- name: Declaration with 2 Tenants - AS3
bigip_as3_deploy:
content: |
{
"class": "AS3",
"action": "deploy",
"persist": true,
"declaration": {
"class": "ADC",
"schemaVersion": "3.0.0",
"id": "urn:uuid:33045210-3ab8-4636-9b2a-c98d22ab915d",
"label": "Sample 1",
"remark": "Simple HTTP application with RR pool",
"Sample_01": {
"class": "Tenant",
"A1": {
"class": "Application",
"template": "http",
"serviceMain": {
"class": "Service_HTTP",
"virtualAddresses": [
"10.0.1.10"
],
"pool": "web_pool"
},
"web_pool": {
"class": "Pool",
"monitors": [
"http"
],
"members": [{
"servicePort": 80,
"serverAddresses": [
"192.0.1.10",
"192.0.1.11"
]
}]
}
}
},
"Sample_02": {
"class": "Tenant",
"A1": {
"class": "Application",
"template": "http",
"serviceMain": {
"class": "Service_HTTP",
"virtualAddresses": [
"10.0.1.11"
],
"pool": "web_pool2"
},
"web_pool2": {
"class": "Pool",
"monitors": [
"http"
],
"members": [{
"servicePort": 80,
"serverAddresses": [
"192.0.1.12",
"192.0.1.13"
]
}]
}
}
}
}
}
- name: Deploying Per-App Declaration
bigip_as3_deploy:
content: |
{
"schemaVersion": "3.48.0",
"Application1": {
"class": "Application",
"service": {
"class": "Service_HTTP",
"virtualAddresses": [
"192.0.10.1"
],
"pool": "pool"
},
"pool": {
"class": "Pool",
"members": [
{
"servicePort": 80,
"serverAddresses": [
"192.0.10.1",
"192.0.10.2"
]
}
]
}
}
}
tenant: sample
- name: Declaration with 2 Tenants with controls parameters - AS3
bigip_as3_deploy:
content: |
{
"class": "AS3",
"action": "deploy",
"persist": true,
"declaration": {
"class": "ADC",
"schemaVersion": "3.0.0",
"id": "urn:uuid:33045210-3ab8-4636-9b2a-c98d22ab915d",
"label": "Sample 1",
"remark": "Simple HTTP application with RR pool",
"Sample_01": {
"class": "Tenant",
"A1": {
"class": "Application",
"template": "http",
"serviceMain": {
"class": "Service_HTTP",
"virtualAddresses": [
"10.0.1.10"
],
"pool": "web_pool"
},
"web_pool": {
"class": "Pool",
"monitors": [
"http"
],
"members": [{
"servicePort": 80,
"serverAddresses": [
"192.0.1.10",
"192.0.1.11"
]
}]
}
}
},
"Sample_02": {
"class": "Tenant",
"A1": {
"class": "Application",
"template": "http",
"serviceMain": {
"class": "Service_HTTP",
"virtualAddresses": [
"10.0.1.11"
],
"pool": "web_pool2"
},
"web_pool2": {
"class": "Pool",
"monitors": [
"http"
],
"members": [{
"servicePort": 80,
"serverAddresses": [
"192.0.1.12",
"192.0.1.13"
]
}]
}
}
}
}
}
controls:
log_level: debug
trace: true
trace_response: true
- name: Controls parameter in declaration as well as module parameters will result in error, NOT RECOMMENDED
bigip_as3_deploy:
controls:
dry_run: true
content: |
{
"action": "deploy",
"class": "AS3",
"declaration": {
"Sample_xyz": {
"A1": {
"class": "Application",
"serviceMain": {
"class": "Service_HTTP",
"pool": "web_pool",
"virtualAddresses": [
"10.0.1.10"
]
},
"template": "http",
"web_pool": {
"class": "Pool",
"members": [
{
"serverAddresses": [
"192.0.1.10",
"192.0.1.11"
],
"servicePort": 80
}
],
"monitors": [
"http"
]
}
},
"class": "Tenant"
},
"class": "ADC",
"id": "urn:uuid:33045210-3ab8-4636-9b2a-c98d22ab915d",
"label": "Sample 1",
"remark": "Simple HTTP application with RR pool",
"schemaVersion": "3.0.0",
"controls": {
"class": "Controls",
"dryRun": false
}
},
"persist": true
}
ignore_errors: true
register: result
- name: Assert expect error due to controls parameter conflict
assert:
that:
- result is failed
- >
"'Controls parameters provided in both, the AS3 declaration
and module parameters. Please provide the controls parameters
in only one place.' in result.msg"
- name: Remove one tenant - AS3
bigip_as3_deploy:
tenant: "Sample_01"
state: absent
Return Values¶
The following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
content
dictionary
|
changed |
The declaration sent to the system.
Sample:
hash/dictionary of values
|
tenant
string
|
changed |
The AS3 tenant to be managed.
Sample:
foobar1
|