1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

test: rollback snapshot

This commit is contained in:
jo 2025-12-10 11:39:59 +01:00
parent 6bcf662e93
commit b2e3ce16e4
No known key found for this signature in database
GPG key ID: B2FEC9B22722B984

View file

@ -218,17 +218,22 @@
that:
- result is changed
# TODO: take snapshot and rollback
# - name: Test rollback snapshot
# hetzner.hcloud.storage_box:
# name: "{{ hcloud_storage_box_name }}"
# snapshot: "TODO"
# state: rollback_snapshot
# register: result
# - name: Verify rollback snapshot
# ansible.builtin.assert:
# that:
# - result is changed
- name: Create snapshot
hetzner.hcloud.storage_box_snapshot:
storage_box: "{{ hcloud_storage_box_name }}"
description: test-rollback
register: _rollback_snapshot
- name: Test rollback snapshot
hetzner.hcloud.storage_box:
name: "{{ hcloud_storage_box_name }}"
snapshot: "{{ _rollback_snapshot.hcloud_storage_box_snapshot.id }}"
state: rollback_snapshot
register: result
- name: Verify rollback snapshot
ansible.builtin.assert:
that:
- result is changed
- name: Test delete
hetzner.hcloud.storage_box: