community.general.pacemaker_stonith module – Manage Pacemaker STONITH

Note

This module is part of the community.general collection (version 11.3.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install community.general.

To use it in a playbook, specify: community.general.pacemaker_stonith.

New in community.general 11.3.0

Synopsis

  • This module manages STONITH in a Pacemaker cluster using the Pacemaker CLI.

Parameters

Parameter

Comments

agent_validation

boolean

Enabled agent validation for STONITH creation.

Choices:

  • false ← (default)

  • true

name

string / required

Specify the STONITH name to create.

state

string

Indicate desired state for cluster STONITH.

Choices:

  • "present" ← (default)

  • "absent"

  • "enabled"

  • "disabled"

stonith_argument

dictionary

Action to associate with STONITH.

argument_action

string

Action to apply to STONITH.

Choices:

  • "group"

  • "before"

  • "after"

argument_options

list / elements=string

Options to associate with STONITH action.

stonith_metas

list / elements=string

List of metadata to associate with STONITH.

stonith_operations

list / elements=dictionary

List of operations to associate with STONITH.

Default: []

operation_action

string

Operation action to associate with STONITH.

operation_options

list / elements=string

Operation options to associate with action.

stonith_options

list / elements=string

Specify the STONITH option to create.

Default: []

stonith_type

string

Specify the STONITH device type.

wait

integer

Timeout period for polling the STONITH creation.

Default: 300

Attributes

Attribute

Support

Description

check_mode

Support: full

Can run in check_mode and return changed status prediction without modifying target.

diff_mode

Support: partial

Only works when check mode is not enabled.

Returns details on what has changed (or possibly needs changing in check_mode), when in diff mode.

See Also

See also

Pacemaker STONITH documentation

Complete documentation for Pacemaker STONITH.

Examples

- name: Create virtual-ip STONITH
  community.general.pacemaker_stonith:
    state: present
    name: virtual-stonith
    stonith_type: fence_virt
    stonith_options:
      - "pcmk_host_list=f1"
    stonith_operations:
      - operation_action: monitor
        operation_options:
          - "interval=30s"

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

previous_value

string

The value of the STONITH before executing the module.

Returned: on success

Sample: "  * virtual-stonith\t(stonith:fence_virt):\t Started"

value

string

The value of the STONITH after executing the module.

Returned: on success

Sample: "  * virtual-stonith\t(stonith:fence_virt):\t Started"

Authors

  • Dexter Le (@munchtoast)