Add location key to Virtual Resources

After ssh_* were removed key location will be used to define where resource will be run
This commit is contained in:
Łukasz Oleś 2015-09-26 17:37:24 +02:00
parent 2b2dd84d6e
commit 990e17252a

View File

@ -3,6 +3,7 @@ id: riak_node
resources: resources:
- id: riak_service0 - id: riak_service0
from: resources/riak_node from: resources/riak_node
location: {{nodes[0]}}
values: values:
riak_self_name: 'riak0' riak_self_name: 'riak0'
riak_hostname: 'riak_server0.solar' riak_hostname: 'riak_server0.solar'
@ -12,6 +13,7 @@ resources:
{% for i in range(1, idx|int) %} {% for i in range(1, idx|int) %}
- id: riak_service{{i}} - id: riak_service{{i}}
from: resources/riak_node from: resources/riak_node
location: {{nodes[i]}}
values: values:
riak_self_name: 'riak{{i}}' riak_self_name: 'riak{{i}}'
riak_hostname: 'riak_server{{i}}.solar' riak_hostname: 'riak_server{{i}}.solar'
@ -23,6 +25,7 @@ resources:
{% for i in range(idx|int) %} {% for i in range(idx|int) %}
- id: hosts_file{{i}} - id: hosts_file{{i}}
from: resources/hosts_file from: resources/hosts_file
location: {{nodes[i]}}
values: values:
hosts:name: hosts:name:
{% for j in range(idx|int) %} {% for j in range(idx|int) %}
@ -37,6 +40,7 @@ resources:
{% for i in range(idx|int) %} {% for i in range(idx|int) %}
- id: haproxy_service_config_http{{i}} - id: haproxy_service_config_http{{i}}
from: resources/haproxy_service_config from: resources/haproxy_service_config
location: {{nodes[i]}}
values: values:
listen_port: 8098 listen_port: 8098
protocol: 'http' protocol: 'http'
@ -54,6 +58,7 @@ resources:
{% for i in range(idx|int) %} {% for i in range(idx|int) %}
- id: haproxy_service_config_pb{{i}} - id: haproxy_service_config_pb{{i}}
from: resources/haproxy_service_config from: resources/haproxy_service_config
location: {{nodes[i]}}
values: values:
listen_port: 8087 listen_port: 8087
protocol: 'tcp' protocol: 'tcp'
@ -71,6 +76,7 @@ resources:
{% for i in range(idx|int) %} {% for i in range(idx|int) %}
- id: haproxy_config{{i}} - id: haproxy_config{{i}}
from: resources/haproxy_config from: resources/haproxy_config
location: {{nodes[i]}}
values: values:
config:protocol: config:protocol:
- haproxy_service_config_http{{i}}::protocol - haproxy_service_config_http{{i}}::protocol
@ -89,6 +95,7 @@ resources:
{% for i in range(idx|int) %} {% for i in range(idx|int) %}
- id: haproxy_service{{i}} - id: haproxy_service{{i}}
location: {{nodes[i]}}
from: resources/haproxy_service from: resources/haproxy_service
values: values:
ip: '{{nodes[i]}}::ip' ip: '{{nodes[i]}}::ip'