now with longer names

This commit is contained in:
matt
2025-08-11 13:36:37 -06:00
parent ee0cf247e1
commit eec8499a5b
4 changed files with 14 additions and 14 deletions

View File

@@ -10,14 +10,14 @@
wait: true
- name: AWS | RESTORE VM | get volumes
register: r_vol_info
register: aws_r_vol_info
amazon.aws.ec2_vol_info:
region: "{{ aws_region }}"
filters:
attachment.instance-id: "{{ instance_id }}"
- name: AWS | RESTORE VM | detach volumes
loop: "{{ r_vol_info.volumes }}"
loop: "{{ aws_r_vol_info.volumes }}"
loop_control:
loop_var: volume
label: "{{ volume.id }}"

View File

@@ -12,14 +12,14 @@
file: snapshot_vm.yml
- name: AWS | SNAPSHOT VM | get volumes
register: r_vol_info
register: aws_r_vol_info
amazon.aws.ec2_vol_info:
region: "{{ aws_region }}"
filters:
attachment.instance-id: "{{ instance_id }}"
- name: AWS | SNAPSHOT VM | take snapshots
loop: "{{ r_vol_info.volumes }}"
loop: "{{ aws_r_vol_info.volumes }}"
loop_control:
loop_var: volume
label: "{{ volume.id }}"
@@ -32,11 +32,11 @@
- name: AWS | SNAPSHOT VM | format snapshot stat
ansible.builtin.set_fact:
snapshot_stat:
aws_snapshot_stat:
- key: "{{ inventory_hostname }}"
value: "{{ r_snapshots.results | json_query(aws_ec2_snapshot_query) }}"
- name: AWS | SNAPSHOT VM | record snapshot with host key
ansible.builtin.set_stats:
data:
aws_snapshots: "{{ snapshot_stat | items2dict }}"
aws_snapshots: "{{ aws_snapshot_stat | items2dict }}"

View File

@@ -17,14 +17,14 @@
kind: Route
name: "{{ eda_controller_project_app_name }}"
namespace: "{{ eda_controller_project }}"
register: r_eda_route
until: r_eda_route.resources[0].spec.host is defined
register: eda_controller_r_eda_route
until: eda_controller_r_eda_route.resources[0].spec.host is defined
retries: 30
delay: 45
- name: Get eda-controller route hostname
ansible.builtin.set_fact:
eda_controller_hostname: "{{ r_eda_route.resources[0].spec.host }}"
eda_controller_hostname: "{{ eda_controller_r_eda_route.resources[0].spec.host }}"
- name: Wait for eda_controller to be running
ansible.builtin.uri:
@@ -36,8 +36,8 @@
validate_certs: false
body_format: json
status_code: 200
register: r_result
until: not r_result.failed
register: eda_controller_r_result
until: not eda_controller_r_result.failed
retries: 60
delay: 45

View File

@@ -3,7 +3,7 @@
redhat.openshift_virtualization.kubevirt_vm_info:
name: "{{ item }}"
namespace: "{{ vm_namespace }}"
register: state
register: snapshot_state
- name: Stop VirtualMachine
redhat.openshift_virtualization.kubevirt_vm:
@@ -11,7 +11,7 @@
namespace: "{{ vm_namespace }}"
running: false
wait: true
when: state.resources.0.spec.running
when: snapshot_state.resources.0.spec.running
- name: Create a VirtualMachineSnapshot
kubernetes.core.k8s:
@@ -37,7 +37,7 @@
namespace: "{{ vm_namespace }}"
running: true
wait: true
when: state.resources.0.spec.running
when: snapshot_state.resources.0.spec.running
- name: Export snapshot name
ansible.builtin.set_stats: