NetApp IT Insider Tips on ONTAP Management using Ansible



  • Most, if not all IT shops, are continually looking for opportunities to reduce costs, deliver efficiency, and be prudent with their time.  Automation with custom scripts is a common approach. Yet maintaining these scripts is cumbersome and time consuming.

     

    As data management experts, NetApp leans on tools like RedHat Ansible to automate software provisioning, configuration management, and application deployment.  NetApp IT relies on some of these NetApp valuable Ansible modules to automate their storage configuration tasks. For example, we have used the Ansible ONTAP modules to reduce Day 0 build times from a 2-day manual process to an automated, 10-minute process.

     

    Using Ansible modules for ONTAP, NXOS (Cisco) and NIOS (Infoblox) we have successfully completed a full Day 0 through Day 1 deployment for the following tasks.

    For those of you that like to visualize the process, here’s how it works:

     

    Here is a sample portion of a playbook used to rename the root aggregates.

    - hosts: localhost
    
      gather_facts: no
    
      connection: local
    
      tasks:
    
        # Rename the root aggregates to match the new node names.
    
        - name: rename aggregates
    
          na_ontap_aggregate:
    
            state: present
    
            service_state: online
    
            from_name: "{{ item.name }}"
    
            name: "{{ item.rename }}"
    
            username: "{{ netapp_username }}"
    
            password: "{{ netapp_password }}"
    
            hostname: "{{ netapp_hostname }}"
    
          with_list:
    
            - { name: 'durlabdevclu01n01a_aggr0', rename: 'durlabdevclu01n01a_aggr_vol0' }
    
            - { name: 'durlabdevclu01n01b_aggr0', rename: 'durlabdevclu01n01b_aggr_vol0' }

     

    Now that you can see the process and a sample of the playbook, it’s time to make it happen.  Get out there and start writing playbooks of your own.  Automate some tasks and save time for other more worthwhile ventures.

     

    There are NetApp modules for ONTAP, Element OS and E-Series which are fully supported and documented.  Module documentation can be found at http://netapp-ansible.readthedocs.io/en/latest/

     

    And there are always good people in thePub if you have any questions.  Good luck!

    The post NetApp IT Insider Tips on ONTAP Management using Ansible appeared first on NetApp Blog.



    https://blog.netapp.com/netapp-it-insider-tips-on-ontap-management-using-ansible/


© Lightnetics 2024