|
39 | 39 | include_tasks: tasks/setup.yml |
40 | 40 |
|
41 | 41 | - name: Run the snapshot role to create snapshot LVs |
42 | | - include_role: |
43 | | - name: linux-system-roles.snapshot |
| 42 | + include_tasks: tasks/run_role_with_clear_facts.yml |
44 | 43 | vars: |
45 | 44 | snapshot_lvm_percent_space_required: 15 |
46 | 45 | snapshot_lvm_all_vgs: true |
|
52 | 51 | that: snapshot_cmd["changed"] |
53 | 52 |
|
54 | 53 | - name: Verify the snapshot LVs are created |
55 | | - include_role: |
56 | | - name: linux-system-roles.snapshot |
| 54 | + include_tasks: tasks/run_role_with_clear_facts.yml |
57 | 55 | vars: |
58 | 56 | snapshot_lvm_all_vgs: true |
59 | 57 | snapshot_lvm_snapset_name: snapset1 |
60 | 58 | snapshot_lvm_verify_only: true |
61 | 59 | snapshot_lvm_action: check |
62 | 60 |
|
63 | 61 | - name: Run the snapshot role again to check idempotence |
64 | | - include_role: |
65 | | - name: linux-system-roles.snapshot |
| 62 | + include_tasks: tasks/run_role_with_clear_facts.yml |
66 | 63 | vars: |
67 | 64 | snapshot_lvm_percent_space_required: 15 |
68 | 65 | snapshot_lvm_all_vgs: true |
|
74 | 71 | that: not snapshot_cmd["changed"] |
75 | 72 |
|
76 | 73 | - name: Verify again to check idempotence |
77 | | - include_role: |
78 | | - name: linux-system-roles.snapshot |
| 74 | + include_tasks: tasks/run_role_with_clear_facts.yml |
79 | 75 | vars: |
80 | 76 | snapshot_lvm_all_vgs: true |
81 | 77 | snapshot_lvm_snapset_name: snapset1 |
|
87 | 83 | that: not snapshot_cmd["changed"] |
88 | 84 |
|
89 | 85 | - name: Run the snapshot role remove the snapshot LVs |
90 | | - include_role: |
91 | | - name: linux-system-roles.snapshot |
| 86 | + include_tasks: tasks/run_role_with_clear_facts.yml |
92 | 87 | vars: |
93 | 88 | snapshot_lvm_snapset_name: snapset1 |
94 | 89 | snapshot_lvm_action: remove |
|
98 | 93 | that: snapshot_cmd["changed"] |
99 | 94 |
|
100 | 95 | - name: Use the snapshot_lvm_verify option to make sure remove is done |
101 | | - include_role: |
102 | | - name: linux-system-roles.snapshot |
| 96 | + include_tasks: tasks/run_role_with_clear_facts.yml |
103 | 97 | vars: |
104 | 98 | snapshot_lvm_snapset_name: snapset1 |
105 | 99 | snapshot_lvm_verify_only: true |
106 | 100 | snapshot_lvm_action: remove |
107 | 101 |
|
108 | 102 | - name: Remove again to check idempotence |
109 | | - include_role: |
110 | | - name: linux-system-roles.snapshot |
| 103 | + include_tasks: tasks/run_role_with_clear_facts.yml |
111 | 104 | vars: |
112 | 105 | snapshot_lvm_snapset_name: snapset1 |
113 | 106 | snapshot_lvm_action: remove |
|
117 | 110 | that: not snapshot_cmd["changed"] |
118 | 111 |
|
119 | 112 | - name: Verify remove again to check idempotence |
120 | | - include_role: |
121 | | - name: linux-system-roles.snapshot |
| 113 | + include_tasks: tasks/run_role_with_clear_facts.yml |
122 | 114 | vars: |
123 | 115 | snapshot_lvm_snapset_name: snapset1 |
124 | 116 | snapshot_lvm_verify_only: true |
|
0 commit comments