ondrejhome.ha_cluster.pcs_constraint_order (1.0.2) — module

wrapper module for 'pcs constraint order'

| "added in version" 2.4 of ondrejhome.ha_cluster"

Authors: Ondrej Famera (@OndrejHome)

preview | supported by community

Install collection

Install with ansible-galaxy collection install ondrejhome.ha_cluster:==1.0.2


Add to requirements.yml

  collections:
    - name: ondrejhome.ha_cluster
      version: 1.0.2

Description

module for creating and deleting clusters order constraints using 'pcs' utility

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: start resA before starting resB
  pcs_constraint_order:
    resource1: 'resA'
    resource2: 'resB'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: make Optional order constraint where resA should start before resB
  pcs_constraint_order:
    resource1: 'resA'
    resource2: 'resB'
    kind: 'Optional'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: start resB after resA was promoted
  pcs_constraint_order:
    resource1: 'resA'
    resource1_action: 'promote'
    resource2: 'resB'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: start resA before starting resB but don't require that resB stope before resA
  pcs_constraint_order:
    resource1: 'resA'
    resource2: 'resB'
    symmetrical: 'false'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove order constraint between resA and resB
  pcs_constraint_order:
    resource1: 'resA'
    resource2: 'resB'
    state: 'absent'

Inputs

    
kind:
    choices:
    - Optional
    - Mandatory
    - Serialize
    default: Mandatory
    description:
    - Kind of the order constraint
    required: false
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - '''present'' - ensure that cluster constraint exists'
    - '''absent'' - ensure cluster constraints doesn''t exist'
    required: false
    type: str

cib_file:
    description:
    - Apply changes to specified file containing cluster CIB instead of running cluster.
    - This module requires the file to already contain cluster configuration.
    required: false
    type: str

resource1:
    description:
    - first resource for constraint
    required: true
    type: str

resource2:
    description:
    - second resource for constraint
    required: true
    type: str

symmetrical:
    choices:
    - 'true'
    - 'false'
    default: 'true'
    description:
    - Is the constraint symmetrical?
    required: false
    type: str

resource1_action:
    choices:
    - start
    - promote
    - demote
    - stop
    default: start
    description:
    - action to which constraint applies for resource1
    required: false
    type: str

resource2_action:
    choices:
    - start
    - promote
    - demote
    - stop
    default: start
    description:
    - action to which constraint applies for resource2
    required: false
    type: str