|
| 1 | +azure_manage_snapshot |
| 2 | +================== |
| 3 | + |
| 4 | +A role to Create/Delete/Restore an Azure OS Disk Snapshot. |
| 5 | + |
| 6 | +Requirements |
| 7 | +------------ |
| 8 | + |
| 9 | +* Azure User Account with valid permission |
| 10 | + |
| 11 | +Role Variables |
| 12 | +-------------- |
| 13 | + |
| 14 | +* **azure_manage_snapshot_operation**: Operation to perform. Valid values are 'create', 'delete', 'restore'. Default is 'create'. |
| 15 | +* **azure_manage_snapshot_resource_group**: (Required) Resource group on/from which the snapshot will reside. |
| 16 | +* **azure_manage_snapshot_location**: The location to use, if not specified it will use the location of the virtual machine. |
| 17 | +* **azure_manage_snapshot_name**: (Required) The name of the snapshot volume. |
| 18 | +* **azure_manage_snapshot_vm_name**: The name of the virtual machine where the snapshot came from or will be applied. |
| 19 | +* **azure_manage_snapshot_disk_name**: The name of the disk that the snapshot will be restored to. |
| 20 | + |
| 21 | +Limitations |
| 22 | +------------ |
| 23 | + |
| 24 | +- NA |
| 25 | + |
| 26 | +Dependencies |
| 27 | +------------ |
| 28 | + |
| 29 | +- NA |
| 30 | + |
| 31 | +Example Playbook |
| 32 | +---------------- |
| 33 | + |
| 34 | + - hosts: localhost |
| 35 | + tasks: |
| 36 | + - name: Create a snapshot from a virtual machine |
| 37 | + ansible.builtin.include_role: |
| 38 | + name: cloud.azure_ops.azure_manage_snapshot |
| 39 | + vars: |
| 40 | + azure_manage_snapshot_operation: create |
| 41 | + azure_manage_snapshot_resource_group: 'resource-group' |
| 42 | + azure_manage_snapshot_vm_name: 'example-vm' |
| 43 | + azure_manage_snapshot_name: 'example-snapshot-volume' |
| 44 | + azure_manage_disk_name: 'example-disk-volume' |
| 45 | + |
| 46 | + - name: Restore a snapshot to a virtual machine |
| 47 | + ansible.builtin.include_role: |
| 48 | + name: cloud.azure_ops.azure_manage_snapshot |
| 49 | + vars: |
| 50 | + azure_manage_snapshot_operation: restore |
| 51 | + azure_manage_snapshot_resource_group: 'resource-group' |
| 52 | + azure_manage_snapshot_vm_name: 'example-vm' |
| 53 | + azure_manage_snapshot_name: 'example-snapshot-volume' |
| 54 | + azure_manage_disk_name: 'example-disk-volume' |
| 55 | + |
| 56 | + - name: Delete a snapshot |
| 57 | + ansible.builtin.include_role: |
| 58 | + name: cloud.azure_ops.azure_manage_snapshot |
| 59 | + vars: |
| 60 | + azure_manage_snapshot_operation: delete |
| 61 | + azure_manage_snapshot_resource_group: 'resource-group' |
| 62 | + azure_manage_snapshot_name: 'example-snapshot-volume' |
| 63 | + |
| 64 | +License |
| 65 | +------- |
| 66 | + |
| 67 | +GNU General Public License v3.0 or later |
| 68 | + |
| 69 | +See [LICENCE](https://github.com/redhat-cop/cloud.azure_ops/blob/main/LICENSE) to see the full text. |
| 70 | + |
| 71 | +Author Information |
| 72 | +------------------ |
| 73 | + |
| 74 | +- Ansible Cloud Content Team |
0 commit comments