Browse Source

Install OCF script before any Pacemaker configuration

Change-Id: Ie5db7bf8f70368baed2ba5f0097ba404ce1a3cec
Closes-bug: #1608852
Swann Croiset 2 years ago
parent
commit
4a72ee8edb
1 changed files with 22 additions and 0 deletions
  1. 22
    0
      deployment_scripts/puppet/manifests/configure_apt.pp

+ 22
- 0
deployment_scripts/puppet/manifests/configure_apt.pp View File

@@ -29,3 +29,25 @@ case $::osfamily {
29 29
         # Currently only Debian like distributions need specific configuration.
30 30
     }
31 31
 }
32
+
33
+$fuel_version = 0 + hiera('fuel_version')
34
+if $fuel_version < 8.0 {
35
+  $cur_node_roles = node_roles(hiera_array('nodes'), hiera('uid'))
36
+  $is_controller = member($cur_node_roles, 'controller') or
37
+                    member($cur_node_roles, 'primary-controller')
38
+} else {
39
+  $is_controller = roles_include(['controller', 'primary-controller'])
40
+}
41
+
42
+if $is_controller {
43
+  # The OCF script should exist before any node tries to configure the
44
+  # Zabbix with Pacemaker. This is why it is shipped by this manifest.
45
+  file { 'zabbix-server-ocf' :
46
+    ensure => present,
47
+    path   => '/usr/lib/ocf/resource.d/fuel/zabbix-server',
48
+    mode   => '0755',
49
+    owner  => 'root',
50
+    group  => 'root',
51
+    source => 'puppet:///modules/plugin_zabbix/zabbix-server.ocf',
52
+  }
53
+}

Loading…
Cancel
Save