-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathsnapshot_instance_lvm.yml
28 lines (26 loc) · 1.1 KB
/
snapshot_instance_lvm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
- name: Create/revert/remove/check LVM snapshots of node
hosts: "{{ rhel_inventory_group | default(omit) }}"
become: yes
environment:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
TERM: linux
tasks:
- ansible.builtin.set_fact:
snapshot_create_set_name: "{{ snapshot_set_name }}"
snapshot_remove_set_name: "{{ snapshot_set_name }}"
snapshot_revert_set_name: "{{ snapshot_set_name }}"
- name: "Execute snapshot check"
ansible.builtin.include_role:
name: "infra.lvm_snapshots.snapshot_create"
vars:
snapshot_create_check_only: true
# Additional snapshot_* vars provided via AAP2 job template and associated surveys
when: lvm_snapshots_action == "check"
- name: "Execute snapshot {{ lvm_snapshots_action }}"
ansible.builtin.include_role:
name: "infra.lvm_snapshots.snapshot_{{ lvm_snapshots_action }}"
# Additional snapshot_* vars provided via AAP2 job template and associated surveys
when: (lvm_snapshots_action == "create") or (lvm_snapshots_action == "remove") or (lvm_snapshots_action == "revert")
...