cohesity / cohesity.dataprotect / 1.0.10 / module / cohesity_job Management of Cohesity Protection Jobs | "added in version" 1.0.10 of cohesity.dataprotect" Authors: Naveena (@naveena-maplelabs)cohesity.dataprotect.cohesity_job (1.0.10) — module
Install with ansible-galaxy collection install cohesity.dataprotect:==1.0.10
collections: - name: cohesity.dataprotect version: 1.0.10
Ansible Module used to register, remove, start, and stop the Cohesity Protection Job on a Cohesity Cluster.
When executed in a playbook, the Cohesity Protection Job will be validated and the appropriate state action
will be applied.
# Create a new Physical Server Protection Job - cohesity_job: cluster: cohesity.lab username: admin password: password state: present name: myhost environment: PhysicalFiles protection_sources: - myhost.domain.lab protection_policy: Bronze storage_domain: Default
# Create a new VMware Server Protection Job - cohesity_job: cluster: cohesity.lab username: admin password: password state: present name: myvcenter environment: VMware protection_sources: - myvcenter.domain.lab protection_policy: Gold storage_domain: Default
# Remove an existing VMware Server Protection Job - cohesity_job: cluster: cohesity.lab username: admin password: password state: absent name: myvcenter environment: VMware
# Remove an existing VMware Server Protection Job and remove all Backups - cohesity_job: cluster: cohesity.lab username: admin password: password state: absent name: myvcenter environment: VMware delete_backups: True
# Start an existing VMware Server Protection Job - cohesity_job: cluster: cohesity.lab username: admin password: password state: started name: myvcenter environment: VMware
# Stop an actively running VMware Server Protection Job - cohesity_job: cluster: cohesity.lab username: admin password: password state: stopped name: myvcenter environment: VMware
name: aliases: - job_name description: - Name to assign to the Protection Job required: true type: str state: choices: - present - absent - started - stopped default: present description: - Determines the state of the Protection Job type: str cluster: aliases: - cohesity_server description: - IP or FQDN for the Cohesity Cluster type: str exclude: description: - Specifies the list of VMs to be exclude. - Applicable only when environment is set to VMware. elements: str type: list include: description: - Specifies the list of VMs to be included. - Applicable only when environment is set to VMware. elements: str type: list indexing: description: - Specifies the list of allowed and denied indexing prefixes - Applicable only when disable_indexing is set to false. - allowed_prefix contains list of prefixes to be allowed while indexing. - denied_prefix contains list of prefixes to be denied while indexing. type: dict time_zone: default: America/Los_Angeles description: - Specifies the timezone to use when calculating time for this Protection Job such as the Job start time. type: str view_name: default: '' description: - Specifies the name of view to be protected. - Required when environment is set to View. type: str start_time: description: - Specifies the registered start time for the Protection Job. Format must be 24hr time in either HHMM or HH:MM style. - If not configured then the Cluster will automatically select a time. type: str description: description: - Optional Description to assign to the Protection Job type: str environment: choices: - VMware - View - Physical - PhysicalFiles - GenericNas default: PhysicalFiles description: - Specifies the environment type (such as VMware or SQL) of the Protection Source this Job - is protecting. Supported environment types include 'PhysicalFiles', 'VMware' required: false type: str exclude_tags: description: - Specifies the list of VMware tags to be exclude. - Applicable only when environment is set to VMware. - Yet to be implemented. elements: str type: list include_tags: description: - Specifies the list of VMware tags to be included. - Applicable only when environment is set to VMware. - Yet to be implemented. elements: str type: list cancel_active: default: false description: - Specifies if Current Running Backup Job should be canceled. If False, active jobs will not be stopped - and a failure will be raised. - Optional and only valid when I(state=stopped) type: bool cohesity_admin: aliases: - admin_name - cohesity_user - username description: - Username with which Ansible will connect to the Cohesity Cluster. Domain Specific credentails can be configured in following formats - AD.domain.com/username - AD.domain.com/username@tenant - LOCAL/username@tenant type: str delete_backups: default: false description: - Specifies if Snapshots generated by the Protection Job should also be deleted when the Job is deleted. - Optional and only valid when I(state=absent) type: bool delete_sources: default: false description: - Specifies job is already available, if source available in Protection Job needs to be removed. - Optional and only valid when (environment=Physical, PhysicalFiles, GenericNas) type: bool storage_domain: default: DefaultStorageDomain description: - Existing Storage Domain to which the Protection Job will be associated. Required when I(state=present). type: str validate_certs: aliases: - cohesity_validate_certs default: false description: - Switch determines if SSL Validation should be enabled. type: bool disable_indexing: default: false description: Enabling this will disable indexing while creating/updating the backup jobs. type: bool cohesity_password: aliases: - password - admin_pass description: - Password belonging to the selected Username. This parameter will not be logged. type: str ondemand_run_type: choices: - Regular - Full - Log - System default: Regular description: - Specifies the type of OnDemand Backup. type: str protection_policy: aliases: - policy default: Bronze description: - Valid policy name or ID for andexisting Protection Policy to be assigned to the job. - Required when I(state=present). type: str append_to_existing: default: false description: - Specifies when job is already available and new list of virtual machines needs to be added to existing list. - If not specified new list of vms will replace the existing vms available in the Protection job. - Optional and only valid when (environment=VMware) type: bool protection_sources: aliases: - sources description: - A list of dictionaries with endpoints and paths to backup. Required when I(state=present). - (valid only for physical sources and file based protection jobs) - protection_sources contains list of dicts(endpoint(str), paths(dict)) - excludeFilePaths - (List, defaults to empty list [], optional field) - String - includeFilePath - (String, default / for linux machines, required field for windows machines) - skipNestedVolumes - True (Boolean, defaults to True) elements: dict type: list