Skip to content

Commit

Permalink
ec2_lc: Update example to use snapshot id (ansible#66064)
Browse files Browse the repository at this point in the history
Fixes: ansible#52085

Signed-off-by: Abhijeet Kasurde <[email protected]>
  • Loading branch information
Akasurde authored and jillr committed Jan 13, 2020
1 parent a79ca57 commit 5c04f25
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/ansible/modules/cloud/amazon/ec2_lc.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,30 @@
volumes:
- device_name: /dev/sdf
no_device: true
- name: Use EBS snapshot ID for volume
block:
- name: Set Volume Facts
set_fact:
volumes:
- device_name: /dev/sda1
volume_size: 20
ebs:
snapshot: snap-XXXX
volume_type: gp2
delete_on_termination: true
encrypted: no
- name: Create launch configuration
ec2_lc:
name: lc1
image_id: ami-xxxx
assign_public_ip: yes
instance_type: t2.medium
key_name: my-key
security_groups: "['sg-xxxx']"
volumes: "{{ volumes }}"
register: lc_info
'''

RETURN = '''
Expand Down

0 comments on commit 5c04f25

Please sign in to comment.