Execute Ansible Playbook using NetApp Docker image

Contributors netapp-manishc Download PDF of this page

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:

  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

    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 by 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] ****************************************************************

    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.