Start here for basic info and let us know if you have specific questions: http://docs.ansible.com/ec2_module.html http://docs.ansible.com/guide_aws.html
On Tue, Sep 30, 2014 at 3:26 AM, wholanda Edwart <[email protected]> wrote: > Guys, > I can use boto to create instance, but my problem, i dont know how to add > tag when use it & get ip address. > If i use ansible, i can give tag name & get ip address of new instance, > but the problem the default of root size is 8GB. > How can i add my python file to create instance in ansible/ edit ec2 in > ansible? > Thx. > > PS: this my python file to create instance: > > #!/usr/bin/python > import boto.ec2 > conn = boto.ec2.connect_to_region("ap-southeast-1", > aws_access_key_id='youraccesskey', > aws_secret_access_key='yoursecretaccesskey') > dev_sda1 = boto.ec2.blockdevicemapping.EBSBlockDeviceType() > dev_sda1.size = 150 # change root volume to 100GB instead of default 8gb > bdm = boto.ec2.blockdevicemapping.BlockDeviceMapping() > bdm['/dev/sda1'] = dev_sda1 > reservation = conn.run_instances( > 'ami-085b155a', > key_name='yourkeyname', > instance_type='m3.large', > security_groups=['yoursecgroupname'], > block_device_map = bdm) > > -- > 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/0c5a68c7-8e26-43dd-b224-ec887f58e098%40googlegroups.com > <https://groups.google.com/d/msgid/ansible-project/0c5a68c7-8e26-43dd-b224-ec887f58e098%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 [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/CA%2BnsWgxVp-y3WvQ8U%2BBNgcP%2BTwUcGrzGS7d_JquSAQUn%2BJfcfA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
