bigip_as3_deploy – Manages AS3 declarations sent to BIG-IP

New in version 1.0.0.

Synopsis

  • Manages AS3 declarations sent to the BIG-IP.

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
    Choices:
  • no
  • yes
If true, the declaration is not deployed to the device.
log_level
string
    Choices:
  • emergency
  • alert
  • critical
  • error
  • warning
  • notice
  • info
  • debug
Controls the amount of detail in logs produced while configuring the tenant.
trace
boolean
    Choices:
  • no
  • yes
If true, BIG-IP AS3 creates a detailed trace of the configuration process for this Tenant for subsequent analysis.
trace_response
boolean
    Choices:
  • no
  • yes
If set to true, the response will contain the trace files.
user_agent
string
User Agent information to include in TEEM report.
state
string
    Choices:
  • present ←
  • absent
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

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


Status

Authors

  • Wojciech Wypior (@wojtek0806)
  • Prateek Ramani (@ramani)