ONTAP Discussions

Netapp Ansible Module netapp.ontap.na_ontap_export_policy_rule

jesseschaal
366 Views

Trying to use ansible to add multiple clients to a export policy rule. With the below playbook it is only adding the first one. Was hoping for some guidance on what i am doing wrong. I have tried to add more rule_index but it just errors out saying that is supposed to be astring.

 

- hosts: localhost
  gather_facts: false
  become: false

  collections:
    - netapp.ontap


  tasks:

    - name: Create ExportPolicyRule
      netapp.ontap.na_ontap_export_policy_rule:
        state: present
        name: xpression
        rule_index: 101
        vserver: vserver1
        client_match: lx034,lx035,lx1260
        ro_rule: any
        rw_rule: any
        protocol: nfs,nfs3,nfs4
        super_user_security: any
        anonymous_user_id: 65534
        allow_suid: true
        ntfs_unix_security: ignore
        hostname: 10.1.1.1
        username: "admin"
        password: "password"
        validate_certs: "false"
        https: "true"

 

Thank you in advance. 

1 REPLY 1

LaurentN
279 Views

What do you mean by only the first one?  Only lx034 shows though you are sending client_matchlx034,lx035,lx1260 ?

Can you clarify and give us the collection version?   Or join us on Discord at: https://discord.gg/netapp

If you want to create more than one rule, you would new to repeat the task block.  It would help to see the error message.

Public