Puppet Class: db2_profile::database::pacemaker_setup

Defined in:
manifests/database/pacemaker_setup.pp

Summary

This class takes care of applying all Pacemeker resources.

Overview

db2_profile::database::pacemaker_setup

Together these resources define a running Pacemaker cluster with multiple nodes.

See the file “LICENSE” for the full license governing this code.

Parameters:

  • clusters (Hash)
  • databases (Hash)

    The Pacemaker database resources you want to ensure on the system. See [here](/docs/db2_config/pcmkr_database.html) for the attributes of the [pcmk_database](/docs/db2_config/pcmkr_database.html)

  • instances (Hash)

    The Pacemaker instance resources you want to ensure on the system. See [here](/docs/db2_config/pcmkr_instance.html) for the attributes of the [pcmk_instance](/docs/db2_config/pcmkr_instance.html)

  • qdevices (Hash)

    The Pacemaker qdevice resources you want to ensure on the system. See [here](/docs/db2_config/pcmkr_qdevice.html) for the attributes of the [pcmk_qdevice](/docs/db2_config/pcmkr_qdevice.html)

  • vips (Hash)

    The Pacemaker vip resources you want to ensure on the system. See [here](/docs/db2_config/pcmkr_vip.html) for the attributes of the [pcmk_vip](/docs/db2_config/pcmkr_vip.html)



29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'manifests/database/pacemaker_setup.pp', line 29

class db2_profile::database::pacemaker_setup (
  Hash $clusters,
  Hash $databases,
  Hash $instances,
  Hash $qdevices,
  Hash $vips
) {
  easy_type::debug_evaluation() # Show local variable on extended debug

  if $clusters.keys.size > 0 {
    echo { "Ensure Pacemaker cluster ${clusters.keys.join(',')}":
      withpath => false,
    }
  }
  ensure_resources('pcmkr_cluster', $clusters)

  if $clusters.keys.size > 0 {
    echo { "Ensure Pacemaker instances ${instances.keys.join(',')}":
      withpath => false,
    }
  }
  ensure_resources('pcmkr_instance', $instances)

  if $databases.keys.size > 0 {
    echo { "Ensure Pacemaker databases ${databases.keys.join(',')}":
      withpath => false,
    }
  }
  ensure_resources('pcmkr_database', $databases)

  if $vips.keys.size > 0 {
    echo { "Ensure Pacemaker vips ${vips.keys.join(',')}":
      withpath => false,
    }
  }
  ensure_resources('pcmkr_vip', $vips)

  if $qdevices.keys.size > 0 {
    echo { "Ensure Pacemaker qdevices ${qdevices.keys.join(',')}":
      withpath => false,
    }
  }
  ensure_resources('pcmkr_qdevice', $qdevices)
}