#Is there a way to customize OnTap module output?

1 messages · Page 1 of 1 (latest)

quartz dove
#

For example, if I use the na_ontap_broadcast_domain module to rename a broadcast domain, the output from the module just prints out:
ok: [cluster01]
ok: [cluster02]

It would be nice if I could have it output the new name of the broadcast domain as well.
I could use the "debug" module, but then it shows up as a different task.
I've used loop_control to do this on others tasks, but can't figure a way to do it if I'm not looping.

frigid hill
#

@quartz dove run the playbook with -v It might give you want your looking for

-v will print out each field of the Ansible response.

The Custom non ansible fields we put in are
Modify -- list of variable modified (this is only true during a modify and not create)
action -- the ansible action we took (create/modify/delete)
extra_responses -- some modules we have additional fields that people have requested we return.
https://github.com/ansible-collections/netapp.ontap/blob/main/plugins/module_utils/netapp.py#L458

`(venv) carchi@carchi-mac-1 test_playbooks (acc_github) $ ansible-playbook test2.yml -v
No config file found; using defaults
[WARNING]: No inventory was parsed, only implicit localhost is available
[WARNING]: provided hosts list is empty, only localhost is available. Note that
the implicit localhost does not match 'all'

PLAY [Starting Playbook] *******************************************************

TASK [create 5 SVM's] **********************************************************
changed: [localhost] => {"actions": "create", "changed": true}

TASK [delete SVM's] ************************************************************
changed: [localhost] => {"actions": "delete", "changed": true}

PLAY RECAP *********************************************************************
localhost : ok=2 changed=2 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 `

GitHub

Ansible collection to support NetApp ONTAP configuration. - ansible-collections/netapp.ontap