Open Zjemm opened 3 years ago
Hello,
F5 has been working on a new module to deploy AS3 declaration via BIG-IQ. I would recommend you to use that module instead.
Thanks & Regards, Roman
Hi @rjouhann
i have tested the new version, but ran into issue's talking to big-iq towards the big-ip, it seems to work ok, but to big-iq not.
i can deploy and patch via the API, using ansible or PHP. and using ATC (= also API)
but using the same json with the new module towards big-iq, i can't get to work and the repository isn't updated in a while
with the files beneath i get the following:
fatal: [localhost]: FAILED! => {"changed": false, "msg": "{'code': 422, 'message': 'status:422, body:{\"code\":422,\"message\":\"Invalid request value \\'[object Object]\\' (path: /declaration) : should have required property \\'class\\' {\\\\\"missingProperty\\\\\":\\\\\"class\\\\\"}\"}', 'originalRequestBody': '{\"code\":422,\"message\":\"Invalid request value \\'[object Object]\\' (path: /declaration) : should have required property \\'class\\' {\\\\\"missingProperty\\\\\":\\\\\"class\\\\\"}\"}', 'referer': '10.10.0.xxx', 'restOperationId': 57963195, 'errorStack': [], 'kind': ':resterrorresponse'}"}
- hosts: all
collections:
- f5networks.f5_bigip
connection: httpapi
vars:
ansible_host: "10.10.0.xxx"
ansible_user: "admin"
ansible_httpapi_password: "xxxxx"
ansible_network_os: f5networks.f5_bigip.bigiq
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: no
tasks:
- name: Declaration test
bigiq_as3_deploy:
content: "{{ lookup('file', '1.json') }}"
#service_type: "as3"
{
"applicationName": "O-E",
"appSvcsDeclaration": {
"class": "AS3",
"action": "deploy",
"declaration": {
"class": "ADC",
"schemaVersion": "3.31.0",
"target": {
"address": "10.10.0.xxx"
},
"pco": {
"class": "Tenant",
"vip1_443": {
"class": "Application",
"template": "https",
"serviceMain": {
"pool": {
"use": "pl_vip1_80"
},
"snat": "auto",
"enable": true,
"iRules": [
{
"use": "iRule_vip1_443"
}
],
"remark": "lekker hoor",
"serverTLS": "clssl_vip1",
"profileTCP": {
"use": "tcp_vip1_443"
},
"virtualPort": 443,
"profileHTTP": {
"use": "http_vip1_443"
},
"virtualAddresses": [
"10.10.10.1"
],
"persistenceMethods": [
{
"use": "sticky-default_vip1"
}
],
"fallbackPersistenceMethod": {
"use": "sticky-fallback_vip1"
},
"serviceDownImmediateAction": "drop",
"class": "Service_HTTPS"
},
"mon_vip1_80": {
"send": "GET / HTTP/1.0\r\n\r\n",
"receive": "",
"receiveDown": "",
"class": "Monitor",
"monitorType": "http"
},
"pl_vip1_80": {
"members": [
{
"adminState": "enable",
"servicePort": 80,
"serverAddresses": [
"192.168.4.10"
]
}
],
"monitors": [
{
"use": "mon_vip1_80"
}
],
"class": "Pool"
},
"iRule_vip1_443": {
"iRule": {
"text": "when HTTP_REQUEST { log local0. \"test irule\" }"
},
"class": "iRule"
},
"sticky-default_vip1": {
"persistenceMethod": "cookie",
"class": "Persist"
},
"sticky-fallback_vip1": {
"persistenceMethod": "source-address",
"class": "Persist"
},
"clssl_vip1": {
"certificates": [
{
"certificate": "crt_vip1"
}
],
"class": "TLS_Server"
},
"crt_vip1": {
"privateKey": {
"bigip": "/Common/default.key"
},
"certificate": {
"bigip": "/Common/default.crt"
},
"class": "Certificate"
},
"tcp_vip1_443": {
"class": "TCP_Profile"
},
"http_vip1_443": {
"class": "HTTP_Profile"
}
}
}
}
}
}
Adding an application via big-iq works as expected, but deleting results in the following error:
doing the same but then to the big-ip does work correctly
ADD application
DELETE application
MY APP: