Skip to main content

Ansible Commvault Module

Ansible Commvault module can be used in playbooks to automate commvault operations Ansible Commvault module can be used in playbooks to automate commvault operations. All agents supported by CVPySDK are supported by commvault ansible module
Ansible Commvault Module
You can find ansible commvault modules on Github
Get Started on Commvault Ansible Commvault Module

1

The following are the requirements to use the Commvault Ansible collection

2

Install Ansible using the below command
ansible-galaxy collection install commvault.ansible

3

Login using the below command
- name: Log in to the Commcell
commvault.ansible.login:
webserver_hostname: 'web_server_hostname'
commcell_username: 'user'
commcell_password: 'password'
More Information

4

Perform push install to a client
- 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
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
Push install using ansible

5

Associate the client to a plan
- 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"
More Information on manage plan

5

Create a backup job
- name: Run a File System Backup for default subclient of default backupset, session file would be used.
commvault.ansible.file_servers.backup:
client: 'client_name'
More Information on backup job