all, i'm new to ansible but not new to netapp. i am using the na_ontap_rest_info module to determine the state of a given snapmirror relationship and possibly assign the state to a variable and print a custom message for the user executing the playbook. num_records will give me what i'm looking for. my issue is assigning that to a variable for later use. can anyone help or suggest a better way?
#snapmirror status and variable assignment
1 messages · Page 1 of 1 (latest)
Ansible registering variable helps - https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#registering-variables
also set_fact - https://docs.ansible.com/ansible/latest/collections/ansible/builtin/set_fact_module.html
We have more complex examples using json_query at https://github.com/ansible-collections/netapp.ontap/tree/main/playbooks/examples/json_query
GitHub
Ansible collection to support NetApp ONTAP configuration. - netapp.ontap/playbooks/examples/json_query at main · ansible-collections/netapp.ontap