-
Notifications
You must be signed in to change notification settings - Fork 18
Description
I think this is similar to:
[https://github.com//issues/56]
(#56)
COMPONENT NAME
f5networks.f5_bigip.bigip_as3_deploy
f5networks.f5_bigip:3.14.0 was installed successfully
Environment
ANSIBLE VERSION
ansible [core 2.17.14]
config file = /root/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/myansible/lib/python3.10/site-packages/ansible
ansible collection location = /root/collections
executable location = /root/myansible/bin/ansible
python version = 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] (/root/myansible/bin/python)
jinja version = 3.1.6
libyaml = True
BIGIP VERSION
Sys::Version
Main Package
Product BIG-IP
Version 17.5.1
Build 0.0.7
Edition Final
Date Wed Jun 18 06:03:07 PDT 2025
CONFIGURATION
more ansible.cfg
[defaults]
collections_paths = ./collections
OS / ENVIRONMENT
249.11-0ubuntu3.16
SUMMARY
Ansible AS3 throws "Cannot set property 'dryRun' of undefined" error
<10.155.236.223> ANSIBLE_NETWORK_IMPORT_MODULES: Result: {'failed': True, 'msg': '{'code': 500, 'message': "Cannot set property 'dryRun' of undefined"}', 'exception': ' File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 825, in main\n results = mm.exec_module()\n File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 504, in exec_module\n changed = self.present()\n File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 520, in present\n if self.exists():\n File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 574, in exists\n raise F5ModuleError(response['contents'])\n', 'invocation': {'module_args': {'content': {'class': 'AS3', 'action': 'deploy', 'persist': True, 'declaration': {'class': 'ADC', 'id': 'id', 'label': 'WebApp', 'ansible': {'class': 'Tenant', 'A1': {'class': 'Application', 'web': {'class': 'Service_HTTP', 'virtualAddresses': ['10.1.2.3'], 'virtualPort': 80, 'pool': 'web_pool'}, 'web_pool': {'class': 'Pool', 'monitors': [{'use': 'http_mon'}], 'members': [{'servicePort': 8080, 'serverAddresses': ['10.2.2.3']}]}, 'http_mon': {'class': 'Monitor', 'monitorType': 'http', 'receive': 'I AM UP'}}}}}, 'state': 'present', 'controls': {'dry_run': False, 'log_level': None, 'trace': None, 'trace_response': None, 'user_agent': None}, 'timeout': 300, 'tenant': None, 'as3_apps_delete': None}}, '_ansible_parsed': True}
The full traceback is:
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 825, in main
results = mm.exec_module()
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 504, in exec_module
changed = self.present()
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 520, in present
if self.exists():
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 574, in exists
raise F5ModuleError(response['contents'])
fatal: [10.155.236.223]: FAILED! => {
STEPS TO REPRODUCE
---
- name: AS3.JSON pushed via ansible
hosts: all
connection: httpapi
gather_facts: false
#dry_run: false
#dryRun: false
# Connection Info
vars:
ansible_user: admin
ansible_httpapi_user: "admin"
ansible_httpapi_pass: "admin"
ansible_httpapi_password: admin
ansible_httpapi_port: 443
ansible_network_os: f5networks.f5_bigip.bigip
ansible_httpapi_use_ssl: yes
ansible_httpapi_validate_certs: false # was no
tasks:
- name: Deploy or Update AS3
f5networks.f5_bigip.bigip_as3_deploy:
content: "{{ lookup('file', 'declarations/as3.json') }}"
state: present
#provider: "{{ httpapi }}"
controls:
dry_run: "False"
#dryRun: false
#ignore_errors: true
# end
[as3.json] (from example files)
{
"class": "AS3",
"action": "deploy",
"persist": true,
"declaration": {
"class": "ADC",
"id": "id",
"label": "WebApp",
"ansible": {
"class": "Tenant",
"A1": {
"class": "Application",
"web": {
"class": "Service_HTTP",
"virtualAddresses": ["10.1.2.3"],
"virtualPort": 80,
"pool": "web_pool"
},
"web_pool": {
"class": "Pool",
"monitors": [{"use": "http_mon"}],
"members": [
{
"servicePort": 8080,
"serverAddresses": [
"10.2.2.3"
]
}
]
},
"http_mon": {
"class": "Monitor",
"monitorType": "http",
"receive": "I AM UP"
}
}
}
}
}
EXPECTED RESULTS
Expected HTTP 200 result
ACTUAL RESULTS
(myansible) root@ubuntu-server:~# ansible-playbook -vvvvv -i inventory/hosts playbook.yaml
ansible-playbook [core 2.17.14]
config file = /root/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/myansible/lib/python3.10/site-packages/ansible
ansible collection location = /root/collections
executable location = /root/myansible/bin/ansible-playbook
python version = 3.10.12 (main, Aug 15 2025, 14:32:43) [GCC 11.4.0] (/root/myansible/bin/python)
jinja version = 3.1.6
libyaml = True
Using /root/ansible.cfg as config file
[DEPRECATION WARNING]: [defaults]collections_paths option, does not fit var naming standard, use the singular form collections_path
instead. This feature will be removed from ansible-core in version 2.19. Deprecation warnings can be disabled by setting
deprecation_warnings=False in ansible.cfg.
setting up inventory plugins
Loading collection ansible.builtin from
host_list declined parsing /root/inventory/hosts as it did not pass its verify_file() method
script declined parsing /root/inventory/hosts as it did not pass its verify_file() method
auto declined parsing /root/inventory/hosts as it did not pass its verify_file() method
Parsed /root/inventory/hosts inventory source with ini plugin
Loading collection f5networks.f5_bigip from /root/collections/ansible_collections/f5networks/f5_bigip
Loading callback plugin default of type stdout, v2.0 from /root/myansible/lib/python3.10/site-packages/ansible/plugins/callback/default.py
Attempting to use 'default' callback.
Skipping callback 'default', as we already have a stdout callback.
Attempting to use 'junit' callback.
Attempting to use 'minimal' callback.
Skipping callback 'minimal', as we already have a stdout callback.
Attempting to use 'oneline' callback.
Skipping callback 'oneline', as we already have a stdout callback.
Attempting to use 'tree' callback.
PLAYBOOK: playbook.yaml ************************************************************************************************************
Positional arguments: playbook.yaml
verbosity: 5
connection: ssh
become_method: sudo
tags: ('all',)
inventory: ('/root/inventory/hosts',)
forks: 5
1 plays in playbook.yaml
PLAY [AS3.JSON pushed via ansible] *************************************************************************************************
TASK [Deploy or Update AS3] ********************************************************************************************************
task path: /root/playbook.yaml:21
looking for "declarations/as3.json" at "/root/files/declarations/as3.json"
looking for "declarations/as3.json" at "/root/declarations/as3.json"
File lookup using /root/declarations/as3.json as file
redirecting (type: connection) ansible.builtin.httpapi to ansible.netcommon.httpapi
Loading collection ansible.netcommon from /root/myansible/lib/python3.10/site-packages/ansible_collections/ansible/netcommon
Loading collection ansible.utils from /root/myansible/lib/python3.10/site-packages/ansible_collections/ansible/utils
<10.155.236.223> Using network group action f5networks.f5_bigip.bigip for f5networks.f5_bigip.bigip_as3_deploy
<10.155.236.223> attempting to start connection
<10.155.236.223> using connection plugin ansible.netcommon.httpapi
Found ansible-connection at path /root/myansible/bin/ansible-connection
<10.155.236.223> local domain socket does not exist, starting it
<10.155.236.223> control socket path is /root/.ansible/pc/9e4fb5c77b
<10.155.236.223> Loading collection ansible.builtin from
<10.155.236.223> redirecting (type: connection) ansible.builtin.httpapi to ansible.netcommon.httpapi
<10.155.236.223> Loading collection ansible.netcommon from /root/myansible/lib/python3.10/site-packages/ansible_collections/ansible/netcommon
<10.155.236.223> Loading collection ansible.utils from /root/myansible/lib/python3.10/site-packages/ansible_collections/ansible/utils
<10.155.236.223> Loading collection f5networks.f5_bigip from /root/collections/ansible_collections/f5networks/f5_bigip
<10.155.236.223> local domain socket listeners started successfully
<10.155.236.223> loaded API plugin ansible_collections.f5networks.f5_bigip.plugins.httpapi.bigip from path /root/collections/ansible_collections/f5networks/f5_bigip/plugins/httpapi/bigip.py for platform type f5networks.f5_bigip.bigip
<10.155.236.223> Loading collection ansible.builtin from
<10.155.236.223> local domain socket path is /root/.ansible/pc/9e4fb5c77b
<10.155.236.223> ANSIBLE_NETWORK_IMPORT_MODULES: enabled
<10.155.236.223> ANSIBLE_NETWORK_IMPORT_MODULES: found f5networks.f5_bigip.bigip_as3_deploy at /root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py
<10.155.236.223> ANSIBLE_NETWORK_IMPORT_MODULES: running f5networks.f5_bigip.bigip_as3_deploy
<10.155.236.223> ANSIBLE_NETWORK_IMPORT_MODULES: complete
<10.155.236.223> ANSIBLE_NETWORK_IMPORT_MODULES: Result: {'failed': True, 'msg': '{\'code\': 500, \'message\': "Cannot set property \'dryRun\' of undefined"}', 'exception': ' File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 825, in main\n results = mm.exec_module()\n File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 504, in exec_module\n changed = self.present()\n File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 520, in present\n if self.exists():\n File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 574, in exists\n raise F5ModuleError(response[\'contents\'])\n', 'invocation': {'module_args': {'content': {'class': 'AS3', 'action': 'deploy', 'persist': True, 'declaration': {'class': 'ADC', 'id': 'id', 'label': 'WebApp', 'ansible': {'class': 'Tenant', 'A1': {'class': 'Application', 'web': {'class': 'Service_HTTP', 'virtualAddresses': ['10.1.2.3'], 'virtualPort': 80, 'pool': 'web_pool'}, 'web_pool': {'class': 'Pool', 'monitors': [{'use': 'http_mon'}], 'members': [{'servicePort': 8080, 'serverAddresses': ['10.2.2.3']}]}, 'http_mon': {'class': 'Monitor', 'monitorType': 'http', 'receive': 'I AM UP'}}}}}, 'state': 'present', 'controls': {'dry_run': False, 'log_level': None, 'trace': None, 'trace_response': None, 'user_agent': None}, 'timeout': 300, 'tenant': None, 'as3_apps_delete': None}}, '_ansible_parsed': True}
The full traceback is:
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 825, in main
results = mm.exec_module()
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 504, in exec_module
changed = self.present()
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 520, in present
if self.exists():
File "/root/collections/ansible_collections/f5networks/f5_bigip/plugins/modules/bigip_as3_deploy.py", line 574, in exists
raise F5ModuleError(response['contents'])
fatal: [10.155.236.223]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"as3_apps_delete": null,
"content": {
"action": "deploy",
"class": "AS3",
"declaration": {
"ansible": {
"A1": {
"class": "Application",
"http_mon": {
"class": "Monitor",
"monitorType": "http",
"receive": "I AM UP"
},
"web": {
"class": "Service_HTTP",
"pool": "web_pool",
"virtualAddresses": [
"10.1.2.3"
],
"virtualPort": 80
},
"web_pool": {
"class": "Pool",
"members": [
{
"serverAddresses": [
"10.2.2.3"
],
"servicePort": 8080
}
],
"monitors": [
{
"use": "http_mon"
}
]
}
},
"class": "Tenant"
},
"class": "ADC",
"id": "id",
"label": "WebApp"
},
"persist": true
},
"controls": {
"dry_run": false,
"log_level": null,
"trace": null,
"trace_response": null,
"user_agent": null
},
"state": "present",
"tenant": null,
"timeout": 300
}
},
"msg": "{'code': 500, 'message': \"Cannot set property 'dryRun' of undefined\"}"
}
PLAY RECAP *************************************************************************************************************************
10.155.236.223 : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
(myansible) root@ubuntu-server:~#