heat circular exception - get server ip in user_data
Hi all, I'm trying to test heat templates, but when I reference the IP of a server in the user_data definition of the server itself I see a CircularDependencyException...
Which is the best way to do what I have in mind (basically modify a config file on my server with the actual IP). Here the snippet related with the error:
serv:
type: OS::Nova::Server
properties:
name: serv
image: image-new
flavor: m1.small
key_name: { get_param: KeyName }
user_data:
str_replace:
template: |
#!/bin/bash -x
echo hola >> /home/ubuntu/hola.txt
sudo sed -i s/\<privateIP\>/"%server_ip%"/g /etc/hola/config
params:
"%server_ip%": {get_attr: [serv, first_address]}
networks:
- port: { get_resource: server_port }
ISSUE UPDATE
Is there a way to extract thos info directly from the heat template?