Łukasz Oleś 25dc2685f5 Refactor VirtualResources
- rename VirtualResource to Composer
- rename event parameter depend_action to child_action
- rename values parameter to input

Closes-bug: #1526780

Change-Id: Ib974e14ff4bda44c2d7d991f62aa4a06dea160ea
2015-12-29 16:50:46 +01:00

47 lines
1.2 KiB
YAML

id: haproxy
resources:
- id: haproxy_config#{index}#
from: resources/haproxy_config
location: #{node}#
input:
ip: '#{node}#::ip'
config:protocol:
#% for config in service_configs %#
- #{config}#::protocol
#% endfor %#
config:listen_port:
#% for config in service_configs %#
- #{config}#::listen_port
#% endfor %#
config:name:
#% for config in service_configs %#
- #{config}#::name
#% endfor %#
config:backends:
#% for config in service_configs %#
- #{config}#::backends
#% endfor %#
- id: haproxy_service#{index}#
location: #{node}#
from: resources/haproxy_service
input:
ip: '#{node}#::ip'
events:
- type: depends_on
parent_action: 'haproxy_service#{index}#.run'
state: 'success'
child_action: 'haproxy_config#{index}#.run'
- type: react_on
parent_action: 'haproxy_config#{index}#.run'
state: 'success'
child_action: 'haproxy_service#{index}#.apply_config'
- type: react_on
parent_action: 'haproxy_config#{index}#.update'
state: 'success'
child_action: 'haproxy_service#{index}#.apply_config'