summaryrefslogtreecommitdiffstats
path: root/scripts/drbd/main.yml
blob: 29ba472aaf2cab2a36d8e9ce5402b03ccc828a4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
version: 2.2
category: File System
shortdesc: DRBD Block Device
longdesc: >-
  Distributed Replicated Block Device. Configure a DRBD cluster resource.

  Also creates a multistate resource managing the state of DRBD.

  Does not create or modify the referenced DRBD configuration.

parameters:
  - name: id
    shortdesc: DRBD Cluster Resource ID
    required: true
    value: drbd-data
    type: resource
  - name: drbd_resource
    shortdesc: DRBD Resource Name
    required: true
    value: drbd0
    type: string
  - name: drbdconf
    value: "/etc/drbd.conf"
  - name: install
    type: boolean
    shortdesc: Install packages for DRBD
    value: false

actions:
  - install: drbd drbd-kmp-default
    shortdesc: Install packages for DRBD
    when: install
  - cib: |
      primitive {{id}} ocf:linbit:drbd
        params
          drbd_resource="{{drbd_resource}}"
          drbdconf="{{drbdconf}}"
        op monitor interval="29s" role="Master"
        op monitor interval="31s" role="Slave"
      ms ms-{{id}} {{id}}
        meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true