The community will be undergoing maintenance soon, requiring Read-Only mode. Click to learn more.

Software Development Kit (SDK) and API Discussions

ansible playbook: create SVM with static IP adress and subnet ...

Thomas2

Hi,

I have a question regarding create a SVM via ansible. We have a network with static IP adresses.

With Ontap GUI you can create SVM ... The data LIF configuration allows to

either  select using subnet with an (static) IP address

or specify IP,netmask and  gateway. This works.

 

In the ansible module 

  • netapp.ontap.na_ontap_interface

this is not possible to do it like in GUI.

The documentation shows for address:

Specifies the LIF's IP address.
Required when state=present and is_ipv4_link_local if false and subnet_name is not set.
 
----------- The part of the playbook --------------------
na_ontap_interface:
state: present
interface_name: ansibletestsvm2_nfs_lif1
home_port: e0c-110
home_node: XXXXXXX
role: data
protocols:
- nfs
admin_status: up
failover_policy: system-defined
firewall_policy: mgmt
is_auto_revert: true
address: XX.XX.XX.XX
netmask: 255.255.254.0
subnet_name: subnet vlan 110
----------------------------------------
 
Any ideas howto configure a SVM with  static IP using ansible ?
Running the playbook give the result:

fatal: [localhost]: FAILED! => {"changed": false, "msg": "parameters are mutually exclusive: subnet_name|address, subnet_name|netmask"}
 
Thanks in advance.
 
Best regards,
 Thomas

 

 

 

2 REPLIES 2

tahmad

hey @Thomas2 , was your question answered by @Greg_Wilson ?

 

thanks

Greg_Wilson

I don't think you need the line

 

subnet_name: subnet vlan 110

 

all I use is

 

<snip>

interface_name: "{{ item.lif_interface_name }}"
home_port: "{{ item.lif_cluster_node_home_port }}"
home_node: "{{ item.lif_cluster_node_home_node }}"
role: "{{ item.lif_role }}"
protocols: "{{ item.lif_protocols }}"
admin_status: up
failover_policy: local-only
firewall_policy: "{{ item.lif_firewall }}"
is_auto_revert: true
address: "{{ item.lif_ip_address }}"
netmask: "{{ item.lif_netmask }}"

<snip>

 

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public