Hi,

Curretly the ec2_vol module only supoprts creating a new volume and
attaching it to an instance. It doesnt partition them and mount them.
probably you should use modules like 'lvg,lvol,filesystem and mount" to get
the other things in place.




On Wed, Jun 3, 2015 at 6:51 PM, Igal Dahan <igal.da...@gmail.com> wrote:

> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/990b1337-0aa2-486b-b931-4dd331be8a9a%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/990b1337-0aa2-486b-b931-4dd331be8a9a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAFUV_d5LnX4sHpFxcizPEo2jN28YU2a%2BKv4Xw%2BZCGoCSf%2BJ8Fw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to