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 }}"