Ansible with OnCommand API Services
This repository contains Ansible modules and sample playbooks which enables you to configure NetApp element based storage management using NetApp OnCommand API Services. Ansible behaves as the orchestrator tool.
These Ansible modules and sample playbooks are written as best effort and provide no warranties or SLAs, expressed or implied.
- Ansible OnCommand API Services Modules
- Sample Playbooks
- Control server distros: RHEL 7.x CentOS 7.x
- OnCommand API Services - 2.0 RC1
- Minimum ONTAP version - ONTAP 9.x
These Ansible modules enables you to configure NetApp element based storage management using NetApp OnCommand API Services.
These modules can be downloaded on your ansible server using the configuration steps below. Once these modules are configured, they can be used in custom written playbook according to specific use cases or requirements. The functionality of these modules is to act as an interface between Ansible and OnCommand API Services. With these modules the commands given at the Ansible server will be translated to RESTful api calls to OnCommand API Services and communicated back.
- Get a working Ansible Setup (rhel-7 or centos-7)
- Get a working OnCommand API Services setup
- Sign-in as root at the Ansible Master machine and the Ansible Slave servers
- Edit the ansible.cfg file to edit the ansible modules library folder. Run command: vi /etc/ansible/ansible.cfg
- Find the commented line for library default value. Remove the # sign from start of the line. Edit it to library = /root/modules
- At the Ansible server, sign-in with root privileges
- Create a new directory. Command: mkdir modules
- Run Command: cd modules
- Run Command: pwd
- Verify that the output is "/root/modules"
- Now download all the modules from ‘modules/OnCommand API Services’ inside "/root/modules"(download these modules to either Master Ansible server or the Slave Ansible servers)
- Install 'requests' python package pip install requests
- Make use of sample playbooks provided to get started
Ansible with NetApp Service Level for service level based NetApp storage management. Look https://github.com/NetApp/Ansible-with-NetApp-Service-Level-Manager/
Please enter an issue (https://github.com/NetApp/Ansible-with-OnCommand-API-Services/issues) if you would like to report a defect