| 1 |
na_ontap_cluster_config |
| 2 |
========= |
| 3 |
|
| 4 |
Configure one or more of the following ONTAP settings: |
| 5 |
|
| 6 |
Licenses |
| 7 |
Disk Assignments |
| 8 |
Cluster DNS |
| 9 |
NTP |
| 10 |
SNMP |
| 11 |
MOTD |
| 12 |
Aggregates |
| 13 |
Ports |
| 14 |
Interface Groups |
| 15 |
VLANS |
| 16 |
Broadcast Domains |
| 17 |
Intercluster LIFs |
| 18 |
|
| 19 |
Requirements |
| 20 |
------------ |
| 21 |
|
| 22 |
Since this uses the NetApp ONTAP modules it will require the python library netapp-lib as well as the Ansible 2.8 release. |
| 23 |
|
| 24 |
Role Variables |
| 25 |
-------------- |
| 26 |
``` |
| 27 |
# For ZAPI: |
| 28 |
cluster: <short ONTAP name of cluster> |
| 29 |
# For REST, cluster should be null |
| 30 |
cluster: |
| 31 |
netapp_hostname: <ONTAP mgmt ip or fqdn> |
| 32 |
netapp_username: <ONTAP admin account> |
| 33 |
netapp_password: <ONTAP admin account password> |
| 34 |
|
| 35 |
#Based on if Variables != or == None determins if a section runs. Each variable will take one or more dictonary entries. Simply omit sections |
| 36 |
#that you don't want to run. The following would run all sections |
| 37 |
|
| 38 |
license_codes: AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAA,AAAAAAAAAAAAAA |
| 39 |
|
| 40 |
disks: # at current the disks module assigns all visiable disks to a node. If you are wanting to split disks, currently that has to be done manually |
| 41 |
- cluster-01 |
| 42 |
- cluster-02 |
| 43 |
|
| 44 |
motd: "The login in message you would like displayed when someone ssh's into the system" |
| 45 |
|
| 46 |
dns: |
| 47 |
- { dns_domains: ansible.local, dns_nameservers: 1.1.1.1 } |
| 48 |
|
| 49 |
ntp: |
| 50 |
- { server_name: time.nist.gov, version: auto } |
| 51 |
|
| 52 |
snmp: |
| 53 |
- { community_name: public, access_control: ro } |
| 54 |
|
| 55 |
aggrs: |
| 56 |
- { name: aggr1, node: cluster-01, disk_count: 26, max_raid: 26 } |
| 57 |
- { name: aggr2, node: cluster-02, disk_count: 26, max_raid: 26 } |
| 58 |
|
| 59 |
ports: #* Ports also has variables 'autonegotiate', and 'flowcontrol' which default to true, and none but can be overriden by your playbook |
| 60 |
- { node: cluster-01, port: e0c, mtu: 9000 } |
| 61 |
- { node: cluster-01, port: e0d, mtu: 9000, flowcontrol: none, autonegotiate: false } |
| 62 |
|
| 63 |
|
| 64 |
ifgrps: |
| 65 |
- { name: a0a, node: cluster-01, ports: "e0a,e0b", mode: multimode, mtu 9000 } |
| 66 |
- { name: a0a, node: cluster-02, ports: "e0a,e0b", mode: multimode, mtu 9000 } |
| 67 |
|
| 68 |
vlans: |
| 69 |
- { id: 201, node: cluster-01, parent: a0a } |
| 70 |
|
| 71 |
bcasts: |
| 72 |
- { name: Backup, mtu: 9000, ipspace: default, ports: 'cluster-01:e0c,vsim-02:e0c' } |
| 73 |
|
| 74 |
# with REST, ipspace is required. It is ignored with ZAPI. broadcast_domain and service_policy are also supported with REST. |
| 75 |
inters: |
| 76 |
- { name: intercluster_1, address: 172.32.0.187, netmask: 255.255.255.0, node: cluster-01, port: e0c, ipspace: Default } |
| 77 |
- { name: intercluster_2, address: 172.32.0.188, netmask: 255.255.255.0, node: cluster-02, port: e0c, ipspace: Default } |
| 78 |
``` |
| 79 |
Dependencies |
| 80 |
------------ |
| 81 |
|
| 82 |
The tasks in this role are dependent on information from the na_ontap_gather_facts module. |
| 83 |
The task for na_ontap_gather_facts can not be excluded. |
| 84 |
|
| 85 |
Example Playbook |
| 86 |
---------------- |
| 87 |
``` |
| 88 |
--- |
| 89 |
- hosts: localhost |
| 90 |
collections: |
| 91 |
- netapp.ontap |
| 92 |
vars_files: |
| 93 |
- globals.yml |
| 94 |
roles: |
| 95 |
- na_ontap_cluster_config |
| 96 |
``` |
| 97 |
|
| 98 |
I use a globals file to hold my variables. |
| 99 |
``` |
| 100 |
cluster_name: cluster |
| 101 |
|
| 102 |
netapp_hostname: 172.32.0.182 |
| 103 |
netapp_username: admin |
| 104 |
netapp_password: netapp123 |
| 105 |
|
| 106 |
license_codes: <removed> |
| 107 |
|
| 108 |
aggrs: |
| 109 |
- { name: aggr1, node: cluster-01, disk_count: 26, max_raid: 26 } |
| 110 |
- { name: aggr2, node: cluster-02, disk_count: 26, max_raid: 26 } |
| 111 |
|
| 112 |
ifgrps: |
| 113 |
- { name: a0a, node: cluster-01, port: "e0a", mode: multimode } |
| 114 |
- { name: a0a, node: cluster-02, port: "e0a", mode: multimode } |
| 115 |
- { name: a0a, node: cluster-01, port: "e0b", mode: multimode } |
| 116 |
- { name: a0a, node: cluster-02, port: "e0b", mode: multimode } |
| 117 |
|
| 118 |
inters: |
| 119 |
- { name: intercluster_1, address: 172.32.0.187, netmask: 255.255.255.0, node: cluster-01, port: e0c, ipspace: Default } |
| 120 |
- { name: intercluster_2, address: 172.32.0.188, netmask: 255.255.255.0, node: cluster-02, port: e0c, ipspace: Default } |
| 121 |
``` |
| 122 |
|
| 123 |
License |
| 124 |
------- |
| 125 |
|
| 126 |
GNU v3 |
| 127 |
|
| 128 |
Author Information |
| 129 |
------------------ |
| 130 |
NetApp |
| 131 |
http://www.netapp.io |