Hi
I have created playbook which i can provision ec2 instance and create
volume to that ec2 instance but when i am connected into the instance the
volume is not recognized and seems not partitioned and thus not mounted.
my questions are:
is the ec2_vol create or attach are partitioning and mounting the new
volume ?
if yes why its not, the playbook is listed below?
if not what should it in order to automatically mounting it ?
- name: Launch instances
local_action:
module: ec2
image: "{{ image }}"
instance_type: "{{ instance_type }}"
keypair: "{{ keypair }}"
instance_tags: '{ "Name":"{{ hostname }}" , "Group":"couchbase" }'
region: "{{ region }}"
group: "{{ group }}"
zone: "{{ zone }}"
wait: "true"
#wait_timeout: 500
spot_wait_timeout: 300
count: "{{count}}"
volumes:
- device_name: /dev/xvda
volume_size: "{{volume_size}}"
register: ec2
- name: Create Volume
local_action:
module: ec2_vol
instance: "{{ item.id }}"
#id: "{{volume_id}}"
#device_name: "/dev/xvdf"
region: "{{ region }}"
zone: "{{ zone }}"
volume_size: 10
volume_type: "gp2"
with_items: ec2.instances
register: ec2_vol
- name: Attach Volume
local_action:
module: ec2_vol
id: "{{item.volume_id}}"
region: "{{ region }}"
zone: "{{ zone }}"
with_items: ec2_vol.results
register: ec2_vol
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/990b1337-0aa2-486b-b931-4dd331be8a9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.