#how to query enabled fpolicies

1 messages · Page 1 of 1 (latest)

short lagoon
#

I am developing a playbook to push fpolicies with events and scopes into the SVMs but it fails frequently if an fpolicy is already enabled with that sequence number. I could not find the required information in ontap_rest_info and had to run ontap_rest_cli.
Is there any module I missed to query the status of fpolicies in svms?

dire orbit
#

What are you running with the ontap_rest_cli so i can check. It might be something we need to add

short lagoon
#

Hello Chris, this is what we do to get the enabled fpolicies.
` - name: query fpolicies
netapp.ontap.na_ontap_rest_cli:
<<: *login
use_rest: Always
command: 'vserver/fpolicy/policy'
verb: 'GET'
register: reg_fpolicy

  • name: disable fpolicy on SVM
    netapp.ontap.na_ontap_fpolicy_status:
    <<: *login
    state: absent
    vserver: "{{item.vserver}}"
    policy_name: "{{item.policy_name}}"
    loop: "{{reg_fpolicy.msg.records}}"`