Closed calltomdinesh closed 4 years ago
@calltomdinesh
Try updating your panos role. apply_state()
was added to the panos role back in March, so you seem to be running very old code.
Thanks, It works.
On Fri, Nov 8, 2019, 11:31 Garfield Lee Freeman notifications@github.com wrote:
@calltomdinesh https://github.com/calltomdinesh
Try updating your panos role. apply_state() was added to the panos role back in March, so you seem to be running very old code.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PaloAltoNetworks/ansible-pan/issues/439?email_source=notifications&email_token=AKNF6CL7QIIOCD5DKKAVJGLQSSXMJA5CNFSM4JI57VQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEDOJ75Q#issuecomment-551329782, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKNF6CPQPTZZRSVJGA2SNCLQSSXMJANCNFSM4JI57VQA .
Glad it works for you now :)
Resolving this issue.
Seeing below error while using panos_static_route module.
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'ConnectionHelper' object has no attribute 'apply_state'
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/root/.ansible/tmp/ansible-tmp-1572933157.85-280592588763105/AnsiballZ_panos_static_route.py\", line 114, in\n _ansiballz_main()\n File \"/root/.ansible/tmp/ansible-tmp-1572933157.85-280592588763105/AnsiballZ_panos_static_route.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/root/.ansible/tmp/ansible-tmp-1572933157.85-280592588763105/AnsiballZ_panos_static_route.py\", line 49, in invoke_module\n imp.load_module('main', mod, module, MOD_DESC)\n File \"/tmp/ansible_panos_static_route_payload_mG2gGW/main.py\", line 214, in \n File \"/tmp/ansible_panos_static_route_payload_mG2gGW/main.py\", line 208, in main\nAttributeError: 'ConnectionHelper' object has no attribute 'apply_state'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
I have used ansible module as below:
panos_static_route: provider: '{{ panos_provider }}' name: 'Test-One' destination: '10.x.x.x/28' nexthop: '10.x.x.x' template: "{{panos_template}}" virtual_router: "{{panos_vr_name}}" state: 'present'
Describe the bug
seeing the error "An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'ConnectionHelper' object has no attribute 'apply_state'" while using panos_static_route module
Expected behavior
Static route has to be created properly
Current behavior
seeing the error "An exception occurred during task execution. To see the full traceback, use -vvv. The error was: AttributeError: 'ConnectionHelper' object has no attribute 'apply_state'" while using panos_static_route module
Possible solution
Steps to reproduce
Not sure. apply_state mehod exists in panos.py
Screenshots
Context
Your Environment