I am using the ec2_snapshot module to make a snapshot of a volume. In the next task, I want to use that new snapshot to create a new volume for a different server. How do I get the new snapshot volume id from the ec2_snapshot module? It errored (unsupported parameter for module: register) when I tried to use register to catch output.
`
- name: snapshot current backup volume
ec2_snapshot:
aws_access_key: “{{aws_key}}”
aws_secret_key: “{{aws_secret}}”
region: “{{aws_region}}”
state: present
wait: yes
wait_timeout: 0 #0 means Never timeout(sec)
description: “snapshot of xvdj from backup server taken {{ansible_date_time.iso8601}}”
instance_id: “i-a34c2437”
device_name: “/dev/xvdj”
snapshot_tags:
frequency: random
`