Skip to content

Commit 1a31993

Browse files
committed
Change vms from running to run_strategy
1 parent 1bca727 commit 1a31993

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

content/modules/ROOT/pages/03-vm-management.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,15 @@ image::new_file.png[title='New File Creation', link=self, window=blank]
7979
redhat.openshift_virtualization.kubevirt_vm:
8080
name: "{{ vm_name }}"
8181
namespace: "{{ vm_namespace }}"
82-
running: false
82+
run_strategy: Halted
8383
wait: true
8484
----
8585
+
8686
Explanation of the Task:
8787
+
8888
* The `kubevirt_vm` module that is part of the `redhat.openshift_virtualization` collection is used to modify a VM
8989
* The `name` parameter uses a user defined variable named `vm_name` to specify which VM to stop
90-
* The `running: false` ensures the VM is not running
90+
* The `run_strategy: Halted` ensures the VM is not running
9191
* The `wait: true` ensures the next Ansible task isn't triggered until the stop is complete
9292
+
9393
. After making and saving the changes, ensure you commit and push them to your Gitea repository. For detailed instructions, refer to xref:appendix-vscode-commit-push.adoc[].
@@ -161,7 +161,7 @@ to identify key fields required to create dynamic Ansible tasks.
161161
redhat.openshift_virtualization.kubevirt_vm:
162162
name: "{{ item.metadata.name }}"
163163
namespace: "{{ item.metadata.namespace }}"
164-
running: false
164+
run_strategy: Halted
165165
wait: true
166166
loop: "{{ vm_info.resources }}"
167167
loop_control:
@@ -244,7 +244,7 @@ The following steps will guide you in creating the `start_vm.yml` file.
244244
redhat.openshift_virtualization.kubevirt_vm:
245245
name: "{{ item.metadata.name }}"
246246
namespace: "{{ item.metadata.namespace }}"
247-
running: true
247+
run_strategy: Always
248248
wait: true
249249
loop: "{{ vm_info.resources }}"
250250
loop_control:
@@ -303,7 +303,7 @@ The following steps will guide you in creating the `restart_vm.yml` file.
303303
redhat.openshift_virtualization.kubevirt_vm:
304304
name: "{{ item.metadata.name }}"
305305
namespace: "{{ item.metadata.namespace }}"
306-
running: false
306+
run_strategy: Halted
307307
wait: true
308308
loop: "{{ vm_info.resources }}"
309309
loop_control:
@@ -319,7 +319,7 @@ The following steps will guide you in creating the `restart_vm.yml` file.
319319
redhat.openshift_virtualization.kubevirt_vm:
320320
name: "{{ item.metadata.name }}"
321321
namespace: "{{ item.metadata.namespace }}"
322-
running: true
322+
run_strategy: Always
323323
wait: true
324324
loop: "{{ updated_vm_info.resources }}"
325325
loop_control:

content/modules/ROOT/pages/06-vm-backup.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ image::new_file.png[title='New File Creation', link=self, window=blank]
280280
redhat.openshift_virtualization.kubevirt_vm:
281281
name: "{{ vm_snapshot_instance.resources[0].metadata.ownerReferences[0].name }}"
282282
namespace: "{{ vm_snapshot_instance.resources[0].metadata.namespace }}"
283-
running: false
283+
run_strategy: Halted
284284
wait: true
285285
286286
- name: Create Restore
@@ -313,7 +313,7 @@ image::new_file.png[title='New File Creation', link=self, window=blank]
313313
redhat.openshift_virtualization.kubevirt_vm:
314314
name: "{{ vm_snapshot_instance.resources[0].metadata.ownerReferences[0].name }}"
315315
namespace: "{{ vm_snapshot_instance.resources[0].metadata.namespace }}"
316-
running: true
316+
run_strategy: Always
317317
wait: true
318318
when: "'resources' in vm_snapshot_instance and vm_snapshot_instance.resources | length == 1"
319319
----

0 commit comments

Comments
 (0)