mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-08-25 23:41:42 -07:00
parent
bc99432f89
commit
eaa5e07b28
247 changed files with 7318 additions and 7375 deletions
|
@ -5,37 +5,37 @@
|
|||
|
||||
- name: Create a snapshot, overwriting if one already exists at path
|
||||
block:
|
||||
- name: Create a snapshot named 'snapshot_clobber'
|
||||
community.general.btrfs_subvolume:
|
||||
automount: Yes
|
||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||
name: "/snapshot_clobber"
|
||||
snapshot_source: "/"
|
||||
snapshot_conflict: "clobber"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Snapshot 'snapshot_clobber' created
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result is changed
|
||||
- name: Create a snapshot named 'snapshot_clobber'
|
||||
community.general.btrfs_subvolume:
|
||||
automount: true
|
||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||
name: "/snapshot_clobber"
|
||||
snapshot_source: "/"
|
||||
snapshot_conflict: "clobber"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Snapshot 'snapshot_clobber' created
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Create a snapshot named 'snapshot_clobber' (no idempotency)
|
||||
community.general.btrfs_subvolume:
|
||||
automount: Yes
|
||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||
name: "/snapshot_clobber"
|
||||
snapshot_source: "/"
|
||||
snapshot_conflict: "clobber"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Snapshot 'snapshot_clobber' created (no idempotency)
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result is changed
|
||||
- name: Create a snapshot named 'snapshot_clobber' (no idempotency)
|
||||
community.general.btrfs_subvolume:
|
||||
automount: true
|
||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||
name: "/snapshot_clobber"
|
||||
snapshot_source: "/"
|
||||
snapshot_conflict: "clobber"
|
||||
state: "present"
|
||||
register: result
|
||||
- name: Snapshot 'snapshot_clobber' created (no idempotency)
|
||||
ansible.builtin.assert:
|
||||
that:
|
||||
- result is changed
|
||||
|
||||
- name: Cleanup created snapshot
|
||||
community.general.btrfs_subvolume:
|
||||
automount: Yes
|
||||
automount: true
|
||||
filesystem_label: "{{ btrfs_subvolume_target_label }}"
|
||||
name: "/snapshot_clobber"
|
||||
state: "absent"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue