ondrejhome.ha_cluster.pcs_property (1.0.2) — module

wrapper module for 'pcs property'

| "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 setting and unsetting cluster and node properties using 'pcs' utility

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: set maintenance mode cluster property (enable maintenance mode)
  pcs_property:
    name: 'maintenance-mode'
    value: 'true'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: unset maintenance mode cluster property (disable maintenance mode)
  pcs_property:
    name: 'maintenance-mode'
    state: 'absent'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: set property 'standby' to 'on' for node 'node-1' (standby node-1)
  pcs_property:
    name: 'standby'
    node: 'node-1'
    value: 'on'
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove 'standby' node attribute from 'node-1' (unstandby node-1)
  pcs_property:
    name: 'standby'
    node: 'node-1'
    state: 'absent'

Inputs

    
name:
    description:
    - name of cluster property
    required: true
    type: str

node:
    description:
    - node name for node-specific property
    required: false
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - '''present'' - ensure that cluster property exists with given value'
    - '''absent'' - ensure cluster property doesn''t exist (is unset)'
    required: false
    type: str

value:
    description:
    - value of cluster property
    required: false
    type: str

cib_file:
    description:
    - Apply changes to specified file containing cluster CIB instead of running cluster.
    required: false
    type: str