61d8e04117
Also split out echo_error function to DRY the error output code and
allow changing the way we report errors in a single place.
Change-Id: I448bf0eb49390f03155335736bb4ab4e979db128
Co-Authored-By: Jiri Stransky <jistr@redhat.com>
(cherry picked from commit 9e5bc65938
)
49 lines
1.4 KiB
YAML
49 lines
1.4 KiB
YAML
heat_template_version: 2014-10-16
|
|
description: 'Post-Puppet Config for Pacemaker deployments'
|
|
|
|
parameters:
|
|
servers:
|
|
type: json
|
|
input_values:
|
|
type: json
|
|
description: input values for the software deployments
|
|
|
|
resources:
|
|
|
|
ControllerPostPuppetMaintenanceModeConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: script
|
|
config: |
|
|
#!/bin/bash
|
|
pacemaker_status=$(systemctl is-active pacemaker)
|
|
|
|
if [ "$pacemaker_status" = "active" ]; then
|
|
pcs property set maintenance-mode=false
|
|
fi
|
|
|
|
ControllerPostPuppetMaintenanceModeDeployment:
|
|
type: OS::Heat::SoftwareDeployments
|
|
properties:
|
|
servers: {get_param: servers}
|
|
config: {get_resource: ControllerPostPuppetMaintenanceModeConfig}
|
|
input_values: {get_param: input_values}
|
|
|
|
ControllerPostPuppetRestartConfig:
|
|
type: OS::Heat::SoftwareConfig
|
|
properties:
|
|
group: script
|
|
config:
|
|
list_join:
|
|
- ''
|
|
- - get_file: pacemaker_common_functions.sh
|
|
- get_file: pacemaker_resource_restart.sh
|
|
|
|
ControllerPostPuppetRestartDeployment:
|
|
type: OS::Heat::SoftwareDeployments
|
|
depends_on: ControllerPostPuppetMaintenanceModeDeployment
|
|
properties:
|
|
servers: {get_param: servers}
|
|
config: {get_resource: ControllerPostPuppetRestartConfig}
|
|
input_values: {get_param: input_values}
|