Skip to main content
Digital Advisor

Execute Ansible Playbook using NetApp Docker image

Contributors netapp-reenu

Before you execute the Ansible Playbook, ensure that the NetApp_Ansible_*.zip file has been extracted and the web server with disk or shelf firmware files is ready.

Before you begin

Before executing Ansible Playbook using NetApp docker, you should:

Steps
  1. Set up Docker.

  2. Pull the NetApp Docker image from DockerHub by executing the following command:

    $ docker pull schmots1/netapp-ansible
    
    Using default tag: latest
    latest: Pulling from schmots1/netapp-ansible
    docker.io/schmots1/netapp-ansible:lates

    For more information about the docker pull command, refer to the Docker Pull Documentation.

  3. Run the Docker image as a container and log in to the container to execute the Ansible Playbook.

  4. Copy the path of the folder which contains the extracted Ansible Playbook and inventory files, for example, downloaded_playbook_path. The Ansible Playbook and inventory files should be in the same folder for successful execution.

  5. Mount the folder as a volume on the Docker container. For example, to mount the folder container_path, you should execute the following command:

    $ docker run -v <downloaded_playbook_path>:/<container_path> -it schmots1/netapp-ansible:latest /bin/bash

    The container starts and the console is now at bash shell of the container. For more information about the Docker Run command, refer to the Docker Run Documentation.

  6. Execute the Ansible Playbook inside the container using the ansible-playbook command:

    $ cd <container_path>
    $ ansible-playbook na_ontap_pb_upgrade_firmware.yml
     
    Enter your ONTAP admin username: ****
    Enter the password for your ONTAP admin user: ****
    Enter the base URL to the firmware package (using HTTP is recommended): http://<web-server>/path/
    PLAY [ONTAP Firmware Upgrade] ****************************************************************
    Note If there are a set of clusters with different login credentials, the Ansible Playbook must be run on each cluster. There are no changes required to the inventory file as the Ansible Playbook skips the clusters for which the login has failed.

For more information about the ansible-playbook command, refer to the Ansible Playbook Documentation and to execute the Ansible playbook in check mode (dry run), refer to Ansible: Check mode.

After executing the Ansible Playbook, refer to the Firmware Installation Validations for post-execution instructions.