62 lines
2.0 KiB
YAML
62 lines
2.0 KiB
YAML
- id: primary-cluster-haproxy
|
|
type: puppet
|
|
version: 2.1.0
|
|
groups: [primary-controller]
|
|
required_for: [deploy_end]
|
|
requires: [deploy_start, virtual_ips, primary-cluster]
|
|
condition:
|
|
yaql_exp: &cluster_haproxy >
|
|
changedAny($.network_scheme, $.network_metadata,
|
|
$.get('database_vip'), ('primary-controller' in $.roles),
|
|
$.get('haproxy'), $.get('external_lb'), $.get('colocate_haproxy'),
|
|
$.debug, $.configuration.get('haproxy'))
|
|
parameters:
|
|
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/cluster-haproxy/cluster-haproxy.pp
|
|
puppet_modules: /etc/puppet/modules
|
|
timeout: 120
|
|
strategy:
|
|
type: parallel
|
|
amount:
|
|
yaql_exp: &haproxy_strategy >
|
|
switch($.get('deployed_before', {}).get('value') => 1, true => 6)
|
|
test_post:
|
|
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/cluster-haproxy/cluster-haproxy_post.rb
|
|
|
|
- id: cluster-haproxy
|
|
type: puppet
|
|
version: 2.1.0
|
|
groups: [controller]
|
|
required_for: [deploy_end]
|
|
requires: [deploy_start, virtual_ips, cluster]
|
|
condition:
|
|
yaql_exp: *cluster_haproxy
|
|
cross-depends:
|
|
- name: primary-cluster-haproxy
|
|
parameters:
|
|
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/cluster-haproxy/cluster-haproxy.pp
|
|
puppet_modules: /etc/puppet/modules
|
|
timeout: 120
|
|
strategy:
|
|
type: parallel
|
|
amount:
|
|
yaql_exp: *haproxy_strategy
|
|
test_post:
|
|
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/cluster-haproxy/cluster-haproxy_post.rb
|
|
|
|
- id: restart-haproxy
|
|
type: puppet
|
|
version: 2.1.0
|
|
groups: [primary-controller, controller]
|
|
required_for: [deploy_end]
|
|
requires: [deploy_start, virtual_ips, cluster]
|
|
condition:
|
|
yaql_exp: '((len(old($)) > 0) or $.deployed_before.value) and changed($.public_ssl.hostname)'
|
|
parameters:
|
|
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/cluster-haproxy/restart-haproxy.pp
|
|
puppet_modules: /etc/puppet/modules
|
|
timeout: 120
|
|
strategy:
|
|
type: parallel
|
|
amount:
|
|
yaql_exp: *haproxy_strategy
|