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?