- Requirements
- Install Instructions
- Contribution Guidelines
- License
- About Commvault
- Additional Roles
- Documentation
- Ansible
- Python 3.6+
- CVPySDK
- Commvault Software v11 SP16+ with Webconsole package installed
Install cvpysdk
using the requirements.txt
file by running pip install -r requirements.txt
You can install this collection from the Ansible Galaxy using the command ansible-galaxy collection install commvault.ansible
You can also manually clone this repository in the given location <Default Ansible Collection Location>/ansible_collections/commvault/
and rename the repo folder from ansiblev2
to ansible
to install this collection without using Ansible Galaxy
- We welcome all the enhancements from everyone although we request the developer to follow some guidelines while interacting with the
Commvault Ansible Collection
codebase. - Before adding any enhancements/bug-fixes, we request you to open an Issue first.
- The core team will go over the Issue and notify if it is required or already been worked on.
- If the Issue is approved, the contributor can then make the changes to their fork and open a pull request.
- All python code should be PEP8 compliant.
- All changes should be consistent with the design of the SDK.
- The code should be formatted using autopep8 with line-length set to 119 instead of default 79.
- All changes and any new methods/classes should be properly documented.
- The docstrings should be of the same format as existing docs.
- Everyone interacting in the
Commvault Ansible Collection
project's codebases, issue trackers, chat rooms, and mailing lists is expected to follow the PyPA Code of Conduct.
CVPySDK
and Commvault Ansible Collection
are licensed under Apache 2.0
Commvault (NASDAQ: CVLT) is a publicly-traded data protection and information management software company headquartered in Tinton Falls, New Jersey. It was formed in 1988 as a development group in Bell Labs, and later became a business unit of AT&T Network Systems. It was incorporated in 1996. Commvault software assists organizations with data backup and recovery, cloud and infrastructure management, and retention and compliance.
fs_deployment: For File System deployment
oracle_db_deployment: For Oracle DB Deployment
-
commvault.ansible.login - login in to the commcell with provided credentials or auth token.
-
commvault.ansible.request - makes a http request on the commserver api
-
commvault.ansible.deployment.install_software - to perform push installation from the commserve
-
commvault.ansible.deployment.download_software - to perform download software on commserve
-
commvault.ansible.deployment.push_updates - to push updates to the clients from commserver
-
commvault.ansible.file_servers.backup - to perform backup of a file server subclient.
-
commvault.ansible.file_servers.restore - to perform restore of a file server subclient.
-
commvault.ansible.workflow.execute - executes the workflow with the workflow name and inputs
-
commvault.ansible.workflow.deploy - deploys a workflow on the commcell.
-
commvault.ansible.workflow.import - imports a workflow to the commcell.
-
commvault.ansible.storage.disk.detail - gets details of a disk storage
Login in to the Commcell with provided credentials or auth token.
commvault.ansible.login can be used to login to Commcell using credentials or auth. token.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | yes | Hostname of the Web Server. | ||
commcell_username | no | Commcell username. | ||
commcell_password | no | Commcell password. | ||
auth_token | no | A authentication token that can be used in place of commcell_username and commcell_password to login. | ||
verify_ssl | no | True | Verify the SSL certificate of the commcell. | |
certificate_path | no | path of the CA_BUNDLE or directory with certificates of trusted CAs (including trusted self-signed certificates) |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
authtoken | On success | str | The authentication token | QSDK value_of_token |
- name: Log in to the Commcell
commvault.ansible.login:
webserver_hostname: 'web_server_hostname'
commcell_username: 'user'
commcell_password: 'password'
Logs out of the Commcell.
commvault.ansible.logout can be used to logout of the Commcell stored in the session file.
- name: Log out of the Commcell
commvault.ansible.logout:
Makes a HTTP request on the Commserver API
This module makes HTTP requests to the Commserver API
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
method | yes |
|
Web method to use to make the request | |
url | yes | The web URL or service to run the HTTP request on. Use "{0}" to autopopulate webconsole URL | ||
payload | no | Dictionary consisting of JSON payload to pass to the HTTP Request |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
response | success | dict | Response of the HTTP request | {'errorCode': 0, 'errorMessage': ''} |
- name: "REQUEST"
commvault.ansible.request:
method: 'GET'
url: '{0}/cvdrbackup/info'
register: response
- name: "REQUEST_RESTART_SERVICES"
commvault.ansible.request:
method: 'POST'
url: '{0}/services/action/restart'
payload:
"action": 2
"client":
"clientName": "client"
"services":
"allServices": true
- name: "REQUEST"
commvault.ansible.request:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
method: 'GET'
url: '{0}/cvdrbackup/info'
register: response
To perform Push Installation from the Commserve
This module performs a Fresh Push Installation to Client Machine from the CommCell commvault.ansible.deployment.install_software module can be used in playbooks to perform Push Installs to Clients
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
os_type | yes |
|
Client machine operating system category | |
client_computers | yes | List of Hostnames of the Client Computers to perform a Push installion | ||
windows_package | no |
|
list of windows features to be installed | |
unix_packages | no |
|
list of unix features to be installed | |
username | no | username of the machine to install features on | ||
password | no | Password of the machine to install features on | ||
install_path | no | Install to a specified path on the client | ||
client_group_name | no | List of the client groups for the client | ||
storage_policy_name | no | Storage policy for the default subclient | ||
sw_cache_client | no | Remote Cache Client Name/ Over-riding Software Cache | ||
ma_index_cache_loaction | no | Index Cache location of the Media Agent package | ||
wait_for_job_completion | no | True | Will wait for Download Job to Complete |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
job_id | success | str | Push Software Job ID | 2016 |
# Run a Push Installation to the client from Commserver.
- name: "INSTALL_SOFTWARE/PUSH_INSTALL"
commvault.ansible.deployment.install_software:
os_type: "windows"
client_computers:
- hostname1.example.com
- x.x.x.x
windows_packages:
- FILE_SYSTEM
- PYTHON_SDK
username: "domain\username"
password: "password"
client_group_name:
- random_group1
- random_group2
- random_group3
install_path: "D:\Random"
sw_cache_client: "RemoteCacheClient1"
wait_for_job_completion: False
- name: "INSTALL_SOFTWARE/PUSH_INSTALL_WINDOWS"
commvault.ansible.deployment.install_software:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
os_type: "unix"
client_computers:
- hostname1.example.com
- x.x.x.x
windows_packages:
- FILE_SYSTEM
- PYTHON_SDK
username: "domain\username"
password: "password"
client_group_name:
- random_group1
- random_group2
- random_group3
install_path: "D:\Random"
sw_cache_client: "RemoteCacheClient1"
wait_for_job_completion: True
- name: "INSTALL_SOFTWARE/PUSH_INSTALL_UNIX"
commvault.ansible.deployment.install_software:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
os_type: "unix"
client_computers:
- hostname1.example.com
- x.x.x.x
unix_packages:
- MEDIA_AGENT
- FILE_SYSTEM
username: "root"
password: "password"
client_group_name:
- random_group1
- random_group2
- random_group3
install_path: "/opt/commvault/ansibledeployment"
ma_index_cache_location: "/opt/commvault/ma_index_cache"
sw_cache_client: "RemoteCacheClient1"
notes:
Either Windows Packages can be provided or Unix Packages but never both together;
Cross platform(Windows & Unix) Push Installation not Supported
-
windows_package option required only for Windows Client Installations & None for Unix Client Installations
-
unix_packages option required only for Unix Client Installations & None for Windows Client Installations
To perform Download Software on Commserve
This module Downloads Media/Latest Payload from the Internet commvault.ansible.deployment.download_software module can be used in playbooks to perform Download Software on CS
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
download_option | no | LATEST_SERVICEPACK |
|
Download option to download software |
os_list | no |
|
list of windows/unix packages to be downloaded | |
service_pack | no | service pack to be downloaded | ||
cu_number | no | 0 | maintenance release number | |
sync_cache | no | True | Download/Sync the Remote Cache | |
wait_for_job_completion | no | True | Will wait for Download Job to Complete |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
job_id | success | str | Download Software Job ID | 2016 |
# Run a Download Job on the Commserver.
- name: "DOWNLOAD_SOFTWARE"
commvault.ansible.deployment.download_software:
download_option: "LATEST_SERVICEPACK"
os_list:
- WINDOWS_64
- UNIX_LINUX64
sync_cache: False
wait_for_job_completion: False
- name: "DOWNLOAD_SOFTWARE"
commvault.ansible.deployment.download_software:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
download_option: "LATEST_SERVICEPACK" (or) "LATEST_HOTFIXES"
os_list:
- WINDOWS_64
- UNIX_LINUX64
sync_cache: False
- name: "DOWNLOAD_SOFTWARE"
commvault.ansible.deployment.download_software:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
download_option: "SERVICEPACK_AND_HOTFIXES"
os_list:
- WINDOWS_64
- UNIX_LINUX64
service_pack: 23
cu_number: 2
sync_cache: False
wait_for_job_completion: False
- {'Service_pack option required only with the Download Option': 'SERVICEPACK_AND_HOTFIXES'}
To Push Updates to the Clients from Commserver
This module pushes latest Updates to client from CommCell commvault.ansible.deployment.push_updates module can be used in playbooks to perform Push Updates to Clients
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
client_names | no | List of Client Names(Name on Commcell) to install service pack on | ||
client_group_names | no | list of Client groups to install service pack on | ||
update_all_client_computers | no | False | boolean to specify whether to install on all clients | |
update_all_client_computer_groups | no | False | boolean to specify whether to install on all clients groups | |
reboot_client | no | False | boolean to specify whether to reboot the client or not while installing updates | |
run_db_maintenance | no | True | boolean to specify whether to run rb maintenance or not | |
install_maintenance_release_only | no | False | boolean to specify whether to install only Maintenance Release or Not | |
wait_for_job_completion | no | True | Will wait for Download Job to Complete |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
job_id | success | str | Push Updates Job ID | 2016 |
# Run a File System Backup for default subclient of default backupset.
- name: "PUSH_UPDATES_TO_ALL_THE_CLIENTS"
commvault.ansible.deployment.push_updates:
update_all_client_computers: True
reboot_client: False
wait_for_job_completion: False
- name: "PUSH_UPDATES_TO_ALL_CLIENT_GROUPS"
commvault.ansible.deployment.push_updates:
client_names:
- clientname1
- clientname2
update_all_client_computers: True
reboot_client: False
- name: "PUSH_UPDATES"
commvault.ansible.deployment.push_updates:
client_names:
- clientname1
- clientname2
client_group_names:
- clientgroupname1
- client_group_name2
update_all_client_computers: False
update_all_client_computer_groups: True
reboot_client: False
wait_for_job_completion: True
- name: "PUSH_UPDATES"
commvault.ansible.deployment.push_updates:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
client_names:
- clientname1
- clientname2
client_group_names:
- clientgroupname1
- client_group_name2
update_all_client_computers: False
update_all_client_computer_groups: True
reboot_client: False
To update the properties of a file server at subclient level.
commvault.ansible.file_servers.manage_content can be used to update the content, filters and exceptions of a File System subclient. keys for 'update' are 'content', 'filter_content', 'exception_content' & will ALWAYS OVERWRITE existing values.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
client | yes | The name of the client. | ||
backupset | no | The name of the backupset. | ||
subclient | no | The name of the subclient. | ||
update | yes |
|
A dictionary of updates to make where update is a dictionary with key is property name & value is property value. |
- name: Update a File System subclient's content and filter, session file would be used.
commvault.ansible.file_servers.manage_content:
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
update:
content:
- C:\ANSIBLE_PATH1
- C:\ANSIBLE_PATH2
filter_content:
- C:\ANSIBLE_PATH1\FILTER1
- C:\ANSIBLE_PATH1\FILTER2
- name: Update a File System subclient's content and filter.
commvault.ansible.file_servers.manage_content:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
update:
content:
- C:\ANSIBLE_PATH1
- C:\ANSIBLE_PATH2
filter_content:
- C:\ANSIBLE_PATH1\FILTER1
- C:\ANSIBLE_PATH1\FILTER2
To perform backup of a file server subclient.
commvault.ansible.file_servers.backup can be used to perform file server backup operation.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
client | yes | The name of the Client. | ||
backupset | no | default backupset | The name of the backupset. | |
subclient | no | subclient named default. | The name of the subclient. | |
backup_level | no | Incremental |
|
Backup Level. |
agent_type | no | File System |
|
Agent Type. |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
job_id | On success | str | Backup job ID | 2016 |
- name: Run an incremental(default) File System Backup for default subclient of default backupset, session file would be used.
commvault.ansible.file_servers.backup:
client: "client_name"
- name: Run an incremental(default) File System Backup for subclient 'user_subclient' of backupset 'user_backupset', session file would be used.
commvault.ansible.file_servers.backup:
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
- name: Run an incremental(default) File System Backup for default subclient of default backupset.
commvault.ansible.file_servers.backup:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
client: "client_name"
- name: Run an incremental(default) File System Backup for subclient 'user_subclient' of backupset 'user_backupset'.
commvault.ansible.file_servers.backup:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
- name: Run an incremental(default) File System Backup for subclient 'user_subclient' of backupset 'user_backupset'i with agent_type of Linux File System.
commvault.ansible.file_servers.backup:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
agent_type: "Linux File System"
- name: Run a full File System Backup for subclient 'user_subclient' of backupset 'user_backupset' specifying 'backup_level' as Full.
commvault.ansible.file_servers.backup:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
backup_level: "Full"
To change the plan associated to the client, backupset or subclient.
commvault.ansible.file_servers.manage_plan can be used to change the server plan associated at the client, backupset or subclient level.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
client | yes | The name of the client. | ||
plan | yes | The name of the server plan which needs to be associated to the entity. | ||
backupset | no | The name of the backupset. | ||
subclient | no | The name of the subclient. |
- name: Associate a client to plan 'server plan', session file will be used.
commvault.ansible.file_servers.manage_plan:
client: "client_name"
plan: "server plan"
- name: Associate a user created subclient to plan 'server plan'.
commvault.ansible.file_servers.manage_plan:
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
plan: "server plan"
- name: Associate a user created subclient to plan 'server plan'.
commvault.ansible.file_servers.manage_plan:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
plan: "server plan"
author:
- Commvault Systems Inc
To perform restore of a file server subclient.
commvault.ansible.file_servers.restore can be used to perform a file server restore operation.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
client | yes | The name of the client. | ||
backupset | no | default backupset | The name of the backupset. | |
subclient | no | subclient named 'default'. | The name of the subclient. | |
agent_type | no | File System |
|
Agent Type. |
content | yes | The path of the content that needs to be restored. | ||
in_place | no | True |
|
Whether the content needs to be restored in place i.e. restored back to the source location. |
destination_path | no | Destination path in case the content needs to be restored to another location. | ||
unconditional_overwrite | no | True |
|
Specifies whether data needs to be overwritten at the destination if the file already exists. |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
job_id | On success | str | Restore job ID | 2017 |
- name: Run a File System Restore for default subclient of default backupset, session file will be used.
commvault.ansible.file_servers.restore:
client: "client_name"
content: "C:\path\of\content"
- name: Run a File System Restore for subclient 'user_subclient' of backupset 'user_backupset', session file will be used.
commvault.ansible.file_servers.restore:
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
content: "C:\path\of\content"
- name: Run a File System Restore for subclient 'user_subclient' of backupset 'user_backupset' and agent_type of Linux File System, session file will be used.
commvault.ansible.file_servers.restore:
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
agent_type: "Linux File System"
content: "C:\path\of\content"
- name: Run an In-Place File System Restore for subclient 'user_subclient' of backupset 'user_backupset'.
commvault.ansible.file_servers.restore:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
client: "client_name"
backupset: "user_backupset"
subclient: "user_subclient"
content: "C:\path\of\content"
in_place: "yes"
kills the Job
This module kills the job commvault.ansible.job.kill module can be used in playbooks to kill the job
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
job_id | yes | ID of the job | ||
wait_for_job_to_kill | no | False | wait till job status is changed to Killed |
# kills a particular Job
- name: "Kill Job"
commvault.ansible.job.kill:
job_id: 3
- name: "kill Job"
commvault.ansible.job.kill:
job_id: 7
wait_for_job_to_kill: False
- name: "kill Job and Wait for kill Task to be completed"
commvault.ansible.job.kill:
job_id: 18
wait_for_job_to_kill: True
- name: "kill Job"
commvault.ansible.job.kill:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
job_id: 23
Resumes the Job
This module resumes the job commvault.ansible.job.resume module can be used in playbooks to resume the job
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
job_id | yes | ID of the job | ||
wait_for_job_to_resume | no | False | wait till job status is changed to Running |
# Resumes a particular Job
- name: "Resume Job"
commvault.ansible.job.resume:
job_id: 3
- name: "Resume Job"
commvault.ansible.job.resume:
job_id: 7
wait_for_job_to_resume: False
- name: "Resume Job and Wait for Resume Task to be completed"
commvault.ansible.job.resume:
job_id: 18
wait_for_job_to_resume: True
- name: "Resume Job"
commvault.ansible.job.resume:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
job_id: 23
Checks the status of the Job
This module Checks the Job Status commvault.ansible.job.status module can be used in playbooks to check the job status
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
job_id | yes | ID of the job | ||
wait_for_job_completion | no | False | wait till job status is changed to Completed/Failed |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
job_id | str | Status of the Job | Running/Completed |
# Checks the status of the particular Job
- name: "Job Status"
commvault.ansible.job.status:
job_id: 3
- name: "Job Status"
commvault.ansible.job.status:
job_id: 7
wait_for_job_completion: False
- name: "Wait for Job Completion and provide the Job Status"
commvault.ansible.job.status:
job_id: 18
wait_for_job_completion: True
- name: "Job Status"
commvault.ansible.job.status:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
job_id: 23
Suspends the Job
This module suspends the job commvault.ansible.job.suspend module can be used in playbooks to suspend the job
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
job_id | yes | ID of the job | ||
wait_for_job_to_suspend | no | False | wait until job status is changed to Suspended |
# Suspends a particular Job
- name: "Suspend Job"
commvault.ansible.job.suspend:
job_id: 3
- name: "Suspend Job"
commvault.ansible.job.suspend:
job_id: 7
wait_for_job_to_suspend: False
- name: "Suspend Job and Wait for Suspend Task to be completed"
commvault.ansible.job.suspend:
job_id: 18
wait_for_job_to_suspend: True
- name: "Suspend Job"
commvault.ansible.job.suspend:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
job_id: 23
Creates a plan
This module creates a Plan in the CommCell
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
name | yes | The name of the plan. | ||
storage_pool_name | yes | The name of the storage to use for the plan. | ||
type | no | Server |
|
The type of plan to create. |
rpo_minutes | no | 1440 | The Recovery Point Objective time in minutes for the plan. Default is 1440 minutes (24 hours) |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
name | Success | str | The name of the plan created | Plan 1 |
- name: Creating a plan
commvault.ansible.plans.add:
name: "Plan 1"
storage_pool_name: "storage2"
- name: Creating a plan with 7 days RPO
commvault.ansible.plans.add:
name: "Plan 1"
storage_pool_name: "storage2"
rpo_minutes: 10080
- name: Creating a "Server" plan with 2 days RPO
commvault.ansible.plans.add:
name: "Plan 1"
type: "Server"
storage_pool_name: "storage2"
type: "Server"
rpo_minutes: 2880
- name: Creating a "Server" plan with 2 days RPO
commvault.ansible.plans.add:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
name: "Plan 1"
type: "Server"
storage_pool_name: "storage2"
rpo_minutes: 2880
Deletes a plan
This module deletes a Plan in the CommCell
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
name | yes | The name of the plan to delete. |
- name: Deleting plan
commvault.ansible.plans.delete:
name: "Plan 1"
- name: Deleting plan
commvault.ansible.plans.delete:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
name: "Plan 1"
Executes the workflow with the workflow name and inputs
This module executes the given Workflow along with it's inputs commvault.ansible.workflow.execute module can be used in playbooks to execute the Workflows on client from Commcell
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
workflow_name | yes | Name of the Workflow | ||
workflow_inputs | yes | Dictionary consisting of inputs to execute the workflow | ||
hidden_workflow | no | False | Is the workflow hidden ? |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
job_id | success | str | Relevant workflow job ID (-1 if N/A) | 2016 |
# Executes the workflow on given Clients/ClientGroups with the workflow name as inputs
- name: "EXECUTE_WORKFLOW"
commvault.ansible.workflow.execute:
workflow_name: "Demo_CheckReadiness"
workflow_inputs:
ClientGroupName: "client_group1"
- name: "EXECUTE_WORKFLOW"
commvault.ansible.workflow.execute:
workflow_name: "client check readiness"
workflow_inputs:
input1_name: "input1_value"
input2_name: "input2_value"
hidden: True
wait_for_job_completion: False
- name: "EXECUTE_WORKFLOW"
commvault.ansible.workflow.execute:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
workflow_name: "client check readiness"
workflow_inputs:
input1_name: "input1_value"
input2_name: "input2_value"
hidden: True
Deploys a workflow on the Commcell.
Deploys a workflow on the Commcell. commvault.ansible.workflow.deploy module can be used in playbooks to Deploys a workflow on the Commcell.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
workflow_name | yes | Name of the Workflow | ||
workflow_engine | yes | name of the client to deploy the workflow on | ||
workflow_xml_path | yes | path of the workflow xml file / XMl contents |
# Deploys a workflow on the Commcell.
- name: "DEPLOY_WORKFLOW"
commvault.ansible.workflow.deploy:
workflow_name: "Demo_CheckReadiness"
workflow_engine: "TempClient"
workflow_xml_path: "C:\TempDir"
- name: "DEPLOY_WORKFLOW"
commvault.ansible.workflow.deploy:
workflow_name: "client check readiness"
workflow_engine: "TempClient"
workflow_xml_path: "C:\TempDir"
- name: "DEPLOY_WORKFLOW"
commvault.ansible.workflow.deploy:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
workflow_name: "client check readiness"
workflow_engine: "TempClient"
workflow_xml_path: "C:\TempDir"
Exports the workflow to the directory location specified by the user.
Exports the workflow XML to the directory location specified by the user. commvault.ansible.workflow.export module can be used in playbooks to export the workflow to the directory location specified by the user.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
workflow_name | yes | Name of the Workflow | ||
export_location | yes | Directory where the workflow would be exported |
# Exports the workflow to the directory location specified by the user.
- name: "EXPORT_WORKFLOW"
commvault.ansible.workflow.export:
workflow_name: "Demo_CheckReadiness"
export_location: "C:\TempDir"
- name: "EXPORT_WORKFLOW"
commvault.ansible.workflow.export:
workflow_name: "client check readiness"
export_location: "C:\TempDir"
- name: "EXPORT_WORKFLOW"
commvault.ansible.workflow.export:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
workflow_name: "client check readiness"
export_location: "C:\TempDir"
Imports a workflow to the Commcell.
Imports a workflow to the Commcell. commvault.ansible.workflow.import module can be used in playbooks to import a workflow on the Commcell.
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Username | ||
commcell_password | no | Password | ||
workflow_name | yes | Name of the Workflow | ||
workflow_xml_path | yes | path of the workflow xml file / XMl contents |
# Imports a workflow to the Commcell.
- name: "IMPORT_WORKFLOW"
commvault.ansible.workflow.import:
workflow_xml_path: "C:\TempDir"
- name: "IMPORT_WORKFLOW"
commvault.ansible.workflow.import:
workflow_xml_path: "C:\TempDir"
- name: "IMPORT_WORKFLOW"
commvault.ansible.workflow.import:
webserver_hostname: "demo-CS-Name"
commcell_username: "user"
commcell_password: "CS-Password"
workflow_xml_path: "C:\TempDir"
Gets details of a disk storage
This module gets details of a given disk storage
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
name | yes | The name of the disk storage pool. |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
detail | Success | dict | Details of the disk storage |
- name: "Getting details of disk storage"
commvault.ansible.storage.disk.detail:
name: "storage2"
- name: "Getting details of disk storage"
commvault.ansible.storage.disk.detail:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
name: "storage2"
Creates a disk storage
This module creates a disk storage in the CommCell
Parameter | required | default | choices | comments |
---|---|---|---|---|
webserver_hostname | no | Hostname of the Web Server. | ||
commcell_username | no | Commcell username | ||
commcell_password | no | Commcell password | ||
name | yes | The name of the disk storage pool. | ||
media_agent | yes | The name of the media agent to create the disk storage for. | ||
mount_path | yes | The path of the disk storage. | ||
deduplication_db_path | yes | The path of the deduplication DB storage |
Name | Returned | Type | Description | Sample |
---|---|---|---|---|
name | Success | str | The name of the disk storage created | storage2 |
- name: Creating disk storage
commvault.ansible.storage.disk.add:
name: "storage2"
media_agent: "cv_mediaagent_1"
mount_path: "D:\storage2"
deduplication_db_path: "D:\ddb_path2"
- name: Creating disk storage
commvault.ansible.storage.disk.add:
webserver_hostname: "web_server_hostname"
commcell_username: "user"
commcell_password: "password"
name: "storage2"
media_agent: "cv_mediaagent_1"
mount_path: "D:\storage2"
deduplication_db_path: "D:\ddb_path2"
If you have any questions or comments, please contact us here. Also Check out our community for Automation incase of queries.