Use Ansible Playbooks to add or edit volumes or LUNs
Beginning 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.
-
In System Manager, go to the UI settings in the cluster settings page:
Cluster > Settings
-
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.
-
Add or Edit the volume:
Volume > Add (or Volume > Edit)
-
Specify or edit the configuration values of the volume.
-
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
(orvolumeEdit.yaml
): The test cases that are required to create or modify the values when reading the inputs from thevariable.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.
-
Add or Edit the LUN:
LUN > Add (or LUN > Edit)
-
Specify or edit the configuration values of the LUN.
-
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
(orlunEdit.yaml
): The test cases that are required to create or modify the values when reading the inputs from thevariable.yaml
file.
-
Download Ansible Playbook files from global search results
You can download Ansible Playbook files when you do a global search.
-
In the search field, enter “volume” or “LUN” or “Playbook”.
-
Find the search result, either “Volume Management (Ansible Playbook)” or “LUN Management (Ansible Playbook)”.
-
Click on 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.
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 |
|
|
Edit a volume |
|
|
Add a LUN |
|
|
Edit a LUN |
|
|
-
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.
-
-
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.
-
Enter your user login credentials.