cyberark / ansible-security-automation-collection

CyberArk Ansible Security Automation Collection
MIT License
60 stars 37 forks source link

cyberark_account #41

Closed axil76 closed 1 year ago

axil76 commented 2 years ago

Summary

Attempting to use collection version 1.1 with cyberark_account after a successful cyberark_authentication results in an error with AttributeError: 'module' object has no attribute 'parse'

Steps to Reproduce


Expected Results

Account not created

Actual Results

The full traceback is: Traceback (most recent call last): File "/var/lib/awx/.ansible/tmp/ansible-tmp-1642154834.93-59714490798091/AnsiballZ_cyberark_account.py", line 114, in _ansiballz_main() File "/var/lib/awx/.ansible/tmp/ansible-tmp-1642154834.93-59714490798091/AnsiballZ_cyberark_account.py", line 106, in _ansiballz_main invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS) File "/var/lib/awx/.ansible/tmp/ansible-tmp-1642154834.93-59714490798091/AnsiballZ_cyberark_account.py", line 49, in invoke_module imp.load_module('main', mod, module, MOD_DESC) File "/tmp/ansible_cyberark_account_payload_FhlQ9s/main.py", line 1378, in File "/tmp/ansible_cyberark_account_payload_FhlQ9s/main.py", line 1326, in main File "/tmp/ansible_cyberark_account_payload_FhlQ9s/main.py", line 1108, in get_account AttributeError: 'module' object has no attribute 'parse'

fatal: [localhost]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1642154834.93-59714490798091/AnsiballZ_cyberark_account.py\", line 114, in \n _ansiballz_main()\n File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1642154834.93-59714490798091/AnsiballZ_cyberark_account.py\", line 106, in _ansiballz_main\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n File \"/var/lib/awx/.ansible/tmp/ansible-tmp-1642154834.93-59714490798091/AnsiballZ_cyberark_account.py\", line 49, in invoke_module\n imp.load_module('main', mod, module, MOD_DESC)\n File \"/tmp/ansible_cyberark_account_payload_FhlQ9s/main.py\", line 1378, in \n File \"/tmp/ansible_cyberark_account_payload_FhlQ9s/main.py\", line 1326, in main\n File \"/tmp/ansible_cyberark_account_payload_FhlQ9s/main.py\", line 1108, in get_account\nAttributeError: 'module' object has no attribute 'parse'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1 }

Reproducible

Version/Tag number

1.1

Environment setup

RHEL7
python2

Additional Information

library does not exist in path

infamousjoeg commented 1 year ago

I cannot reproduce this error. I am able to do this successfully in my environment. One change I did make to what was provided is I removed the platform_account_properties: section since there wasn't anything declared within that key. It could be possible that is the issue.

Closing this for now and if it's still an issue, please run a test using the latest version of the collection and Ansible and open a new issue with the relevant information.