Skip to content

Instantly share code, notes, and snippets.

@larsks
Created May 8, 2015 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save larsks/13ec53c1a758c3231d57 to your computer and use it in GitHub Desktop.
Save larsks/13ec53c1a758c3231d57 to your computer and use it in GitHub Desktop.
heat_template_version: 2014-10-16
description: A simple server.
resources:
server:
type: OS::Nova::Server
properties:
flavor: m1.tiny
networks:
- network: 81c4ba7e-0269-44a2-98fe-82ff6102a1e5
key_name: lars
image: larsks/mini-httpd
member:
type: OS::Nova::Server
properties:
flavor: m1.tiny
networks:
- network: 81c4ba7e-0269-44a2-98fe-82ff6102a1e5
key_name: lars
image: larsks/mini-httpd
user_data:
str_replace:
template: |
#!/bin/bash
sed -i "s/localhost/http_ipaddr/" /opt/test.sh
params:
http_ipaddr: { get_attr: [server,first_address ] }
outputs:
HttpIP:
description: IP of HTTP server
value:
str_replace:
template: http://host
params:
host: { get_attr: [server,first_address] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment