Closed axil76 closed 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.
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
name: Logon to CyberArk Vault using PAS Web Services SDK cyberark_authentication: api_base_url: "https://{{ cal_host }}" validate_certs: no username: "{{ cal_login }}" password: "{{ cal_password }}"
name: Debug message debug: var: cyberark_session
name: Account cyberark_account: identified_by: "address,username" safe: "{{ cal_safe }}" address: "https://{{ cal_host }}" username: "{{ cal_username }}" platform_id: "{{ cal_platformID }}" secret: "{{ cal_mdp }}" platform_account_properties: secret_management: automatic_management_enabled: true state: present cyberark_session: "{{ cyberark_session }}" register: cyberarkaction
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
Additional Information
library does not exist in path