community.general.pacemaker_resource module – Manage pacemaker resources
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_resource
.
New in community.general 10.5.0
Synopsis
This module can manage resources in a Pacemaker cluster using the pacemaker CLI.
Parameters
Parameter |
Comments |
---|---|
Specify the resource name to create or clone to. This is required if |
|
Action to associate with resource. |
|
Action to apply to resource. Choices:
|
|
Options to associate with resource action. |
|
List of clone resource IDs to clone from. |
|
List of metadata to associate with clone resource. |
|
List of meta to associate with resource. |
|
List of operations to associate with resource. Default: |
|
Operation action to associate with resource. |
|
Operation option to associate with action. |
|
Specify the resource option to create. Default: |
|
Resource type to create. |
|
Specify the resource type name. |
|
Specify the resource type providers. |
|
Specify the resource type standard. |
|
Indicate desired state for cluster resource. The states If Choices:
|
|
Timeout period for polling the resource creation. Default: |
Attributes
Attribute |
Support |
Description |
---|---|---|
Support: full |
Can run in |
|
Support: none |
Returns details on what has changed (or possibly needs changing in |
Examples
---
- name: Create pacemaker resource
hosts: localhost
gather_facts: false
tasks:
- name: Create virtual-ip resource
community.general.pacemaker_resource:
state: present
name: virtual-ip
resource_type:
resource_name: IPaddr2
resource_option:
- "ip=[192.168.2.1]"
resource_argument:
argument_action: group
argument_option:
- master
resource_operation:
- operation_action: monitor
operation_option:
- interval=20
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The cluster resource output message. Returned: always Sample: |