arensb / ansible-truenas

Ansible collection to manage TrueNAS
Apache License 2.0
34 stars 7 forks source link

Incorrect attribute name in pool_scrub_task module #20

Closed bmarinov closed 3 months ago

bmarinov commented 3 months ago

Invoking the module with invalid or not nonexistent pool name will cause the module to run into a syntax error and fail to report the underlying problem:

Traceback (most recent call last):
  File "/tmp/ansible_arensb.truenas.pool_scrub_task_payload_qbsery8n/ansible_arensb.truenas.pool_scrub_task_payload.zip/ansible_collections/arensb/truenas/plugins/modules/pool_scrub_task.py", line 186, in main
AttributeError: 'AnsibleModule' object has no attribute 'json_fail'

During handling of the above exception, another exception occurred:
...

There is no attribute called json_fail, the correct name is fail_json.

arensb commented 3 months ago

Oops!

arensb commented 3 months ago

Fixed in v1.9.5.