Install OCF script before any Pacemaker configuration
Change-Id: Ie5db7bf8f70368baed2ba5f0097ba404ce1a3cec Closes-bug: #1608852
This commit is contained in:
parent
2bed5dbe6e
commit
4a72ee8edb
|
@ -29,3 +29,25 @@ case $::osfamily {
|
||||||
# Currently only Debian like distributions need specific configuration.
|
# Currently only Debian like distributions need specific configuration.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$fuel_version = 0 + hiera('fuel_version')
|
||||||
|
if $fuel_version < 8.0 {
|
||||||
|
$cur_node_roles = node_roles(hiera_array('nodes'), hiera('uid'))
|
||||||
|
$is_controller = member($cur_node_roles, 'controller') or
|
||||||
|
member($cur_node_roles, 'primary-controller')
|
||||||
|
} else {
|
||||||
|
$is_controller = roles_include(['controller', 'primary-controller'])
|
||||||
|
}
|
||||||
|
|
||||||
|
if $is_controller {
|
||||||
|
# The OCF script should exist before any node tries to configure the
|
||||||
|
# Zabbix with Pacemaker. This is why it is shipped by this manifest.
|
||||||
|
file { 'zabbix-server-ocf' :
|
||||||
|
ensure => present,
|
||||||
|
path => '/usr/lib/ocf/resource.d/fuel/zabbix-server',
|
||||||
|
mode => '0755',
|
||||||
|
owner => 'root',
|
||||||
|
group => 'root',
|
||||||
|
source => 'puppet:///modules/plugin_zabbix/zabbix-server.ocf',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue