Attach static ip address to gce instance on launch

105 views
Skip to first unread message

hars...@gmail.com

unread,
Dec 25, 2014, 2:50:32 PM12/25/14
to ansible...@googlegroups.com
Hi , Im trying to come up with a play that will attach a previously reserved static ip address to a instance on creation by ansible.from https://cloud.google.com/compute/docs/instances-and-network#staticnetworkaddress  recommended course seem to use  $ gcloud compute instances create example-instance --address example-address-2     to achieve this.Is there an equivalent within the ansible gce module.Would like to use it to setup a nginx server so that the IP persists even if the instance needs to be replaced for whatever reason.
Attaching at creation seems to be the better option as attaching it later increases the complexity of the task. 

abdulrahim umar

unread,
Dec 29, 2014, 6:07:26 AM12/29/14
to ansible...@googlegroups.com
Well decided to go with Hashicorp's terraform tool for the IP address ,instance creation and attachment and will be trying to use its local_exec feature to call my playbooks.

Peter Mooshammer

unread,
Jan 14, 2015, 1:50:09 PM1/14/15
to ansible...@googlegroups.com


On Thursday, December 25, 2014 at 11:50:32 AM UTC-8, abdulrahim umar wrote:
Hi , Im trying to come up with a play that will attach a previously reserved static ip address to a instance on creation by ansible.from https://cloud.google.com/compute/docs/instances-and-network#staticnetworkaddress  recommended course seem to use  $ gcloud compute instances create example-instance --address example-address-2     to achieve this.Is there an equivalent within the ansible gce module.Would like to use it to setup a nginx server so that the IP persists even if the instance needs to be replaced for whatever reason.
Attaching at creation seems to be the better option as attaching it later increases the complexity of the task. 


Feature request!!! +1 
Reply all
Reply to author
Forward
0 new messages