...sorry, not an answer to your ansible question, but in Google Cloud
Platform you can use the instance name instead of an IP address and that
will resolve to the instance, whatever its IP - so you may not need a
static IP at all.

On 11 June 2016 at 08:58, Abdul Jabbar Azam <[email protected]> wrote:

> Hello,
>
> I'd like to add a private IP address when creating google gce instances.
> Looking at the docs this doesn't seem to be possible.
> http://docs.ansible.com/ansible/gce_module.html. I am using version 2.1
> from the source at github cloned using git a few weeks ago.
>
> If I use the gloud SDK I can create the instance
>
> gcloud compute --project "my-project" instances create "bootstrap" --zone
> "europe-west1-d" --machine-type "f1-micro" --subnet
> "default-6f68d4d6fabcb680" --private-network-ip "10.132.0.2" --metadata
> "block-project-ssh-keys=true" --maintenance-policy "MIGRATE" --scopes
> default="https://www.googleapis.com/auth/cloud-platform"; --disk
> "name=docker-disk-for-instance-bootstrap,device-name=docker-disk-for-bootstrap,mode=rw,boot=no"
> --image "/centos-cloud/centos-7-v20160511" --boot-disk-size "10"
> --boot-disk-type "pd-standard" --boot-disk-device-name "bootstrap"
>
> I need to create a few instances with static IP addresses because I'm
> trying to write an install script for DCOS on GCE and a number of the
> instances need a private static IP address.
>
> Is there a way to add a private IP addresses to a google instance using
> the gce module or should I call the gcloud tool using the command module?
>
> --
> 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/244fbeb3-adde-4969-a816-bf798d2740c5%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/244fbeb3-adde-4969-a816-bf798d2740c5%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jonathan Miller
Senior DevOps & Big Data Engineer, Appsbroker Consulting
Mob: 07580 779841

-- 


Follow us on:   <https://plus.google.com/+Appsbroker/>  
<https://twitter.com/appsbroker>  
<http://www.linkedin.com/company/appsbroker-consulting-limited/careers?trk=top_nav_careers>


Appsbroker Consulting Limited, Registered office: Appsbroker House, The 
Square, Swindon,
SN1 3EB, Company Number: 5702796, VAT Number: GB 876 3533 92, Company 
registered in England and Wales.
________________________________________
PLEASE NOTE AS RECIPIENT OF THIS EMAIL: Any views or opinions presented are 
solely those of the author and do not represent those of Appsbroker 
Consulting Limited. This e-mail is confidential and intended solely for the 
addressee. If you are not the intended recipient, be advised that you have 
received this mail in error and that any use, dissemination, forwarding, 
printing or copying of this e-mail is strictly prohibited. Furthermore, if 
you are not the intended recipient, please email it back to the sender and 
then immediately permanently delete it.

-- 
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/CAM29nNbp1XKL1N1XBfr7CiSHGFZkRDO8dE0u4pFdU4irB9G68w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to