Use Ansible Playbooks to add or edit volumes or LUNs

Download PDF of this page

Starting with ONTAP 9.9.1, you can use Ansible Playbooks with System Manager when you want to add or edit volumes or LUNs.

This feature lets you use the same configuration multiple times or use the same configuration with slight changes when you add or edit volumes or LUNs.

Enable or disable Ansible Playbooks

You can enable or disable the use of Ansible Playbooks with System Manager.

Steps
  1. In System Manager, go to the UI settings in the cluster settings page:

    Cluster > Settings

  2. Under UI Settings, change the slider switch to "Enabled" or "Disabled".

Save a volume configuration to an Ansible Playbook

When you create or modify the configuration of a volume, you can save the configuration as Ansible Playbook files.

Steps
  1. Add or Edit the volume:

    Volume > Add (or Volume > Edit)

  2. Specify or edit the configuration values of the volume.

  3. Select Save to Ansible Playbook to save the configuration to Ansible Playbook files.

    A zip file is downloaded that contains the following files:

    • variable.yaml: The values you entered or modified to add or edit the volume.

    • volumeAdd.yaml (or volumeEdit.yaml): The test cases that are required to create or modify the values when reading the inputs from the variable.yaml file.

Save a LUN configuration to an Ansible Playbook

When you create or modify the configuration of a LUN, you can save the configuration as Ansible Playbook files.

Steps
  1. Add or Edit the LUN:

    LUN > Add (or LUN > Edit)

  2. Specify or edit the configuration values of the LUN.

  3. Select Save to Ansible Playbook to save the configuration to Ansible Playbook files:

    A zip file is downloaded that contains the following files:

    • variable.yaml: The values you entered or modified to add or edit the LUN.

    • lunAdd.yaml (or lunEdit.yaml): The test cases that are required to create or modify the values when reading the inputs from the variable.yaml file.

Download Ansible Playbook files from global search results

You can download Ansible Playbook files when you do a global search.

Steps
  1. In the search field, enter “volume” or “LUN” or “Playbook”.

  2. Find the search result, either “Volume Management (Ansible Playbook)” or “LUN Management (Ansible Playbook)”.

  3. Click on download icon to download the Ansible Playbook files.

Work with Ansible Playbook files

Ansible Playbook files can be modified and run to specify configurations for volumes and LUNs.

About this task

You use two files to perform an operation (either an “add” or an “edit”):

If you want to…​ Use this variable file…​ And use this run file…​

Add a volume

volumeAdd-varible.yaml

valueAdd.yaml

Edit a volume

volumeEdit-variable.yaml

volumeEdit.yaml

Add a LUN

lunAdd-variable.yaml

lunAdd.yaml

Edit a LUN

lunEdit-variable.yaml

lunEdit.yaml

Steps
  1. Modify the variables file.

    The file contains the various values that you use to configure the volume or LUN.

    • If you do not change the values, leave them commented.

    • If you modify the values, remove the commenting.

  2. Run the associated run file.

    The run file contains the test cases that are required to create or modify the values when reading the inputs from the variable file.

  3. Enter your user login credentials.