skriptfabrik.pacemaker
Ansible Role: pacemaker
Description
This role helps you set up and configure a high availability (HA) cluster using pacemaker and corosync services.
Installation
To install this role, run:
ansible-galaxy install skriptfabrik.pacemaker
Requirements
No special requirements.
Role Variables
Here are the key variables you can set for this role:
Variable | Type | Default | Comments |
---|---|---|---|
corosync_authkey_file | string | /etc/corosync/authkey |
Path to the corosync authentication key file |
corosync_bindnet_interface | string | Network interface for cluster communication | |
corosync_cluster_name | string | corosync-cluster |
Name of the corosync cluster |
corosync_config_file | string | /etc/corosync/corosync.conf |
Path to the corosync configuration file |
corosync_log_file | string | /var/log/corosync/corosync.log |
Path to the corosync log file |
pacemaker_cluster_group | string | Name of the ansible host group for the cluster | |
pacemaker_cluster_properties | list of dictionaries | Definitions of cluster settings | |
pacemaker_cluster_resources | list of dictionaries | Definitions of cluster resources | |
pacemaker_cluster_constraints | list of dictionaries | Definitions of cluster constraints |
pacemaker_cluster_properties
definition
Key | Type | Default | Comments |
---|---|---|---|
name | string | Name of the cluster property | |
state | string | present |
Create or update the resource if present , remove if absent |
value | mixed | null |
Value of the cluster property (defaults if not defined) |
pacemaker_cluster_resources
definition
Key | Type | Default | Comments |
---|---|---|---|
resource_id | string | Unique name for the cluster resource | |
state | string | present |
Create or update if present , remove if absent |
provider | string | Name of the resource provider (list available providers using pcs resource providers ) |
|
options | list of strings | [] |
Optional list of options for the provider |
operations | list of dictionaries | [] |
Optional list of operations for the resource |
stickiness | integer | 0 |
Optional stickiness value for the resource |
test_command | string | null |
Optional command to test the service resource configuration |
operations
definition
Key | Type | Default | Comments |
---|---|---|---|
name | string | Name of the operation (e.g. start , stop , monitor ) |
|
state | string | present |
Create or update the resource if present , remove if absent |
options | list of strings | [] |
Optional list of options for the operation |
pacemaker_cluster_constraints
definition
Key | Type | Default | Comments |
---|---|---|---|
type | string | Type of constraint (colocation or order ) |
|
colocation | dictionary | Settings for colocation constraints | |
order | dictionary | Settings for order constraints |
colocation
constraint definition
Key | Type | Default | Comments |
---|---|---|---|
state | string | present |
Create or update if present , remove if absent |
source_resource_id | string | Source resource id for the constraint | |
target_resource_id | string | Target resource id for the constraint | |
score | integer/string | INFINITY |
Score for the constraint |
order
constraint definition
Key | Type | Default | Comments |
---|---|---|---|
first_resource | string | ID of the first resource | |
first_resource_action | string | Action of the first resource (e.g. start ) |
|
second_resource | string | ID of the second resource | |
second_resource_action | string | Optional action for the second resource (e.g. start ) |
|
options | list of strings | [] |
Optional list of options for the order |
Dependencies
None required.
Example Playbook
Here’s an example of how to use this role in a playbook:
- hosts: all
roles:
- skriptfabrik.pacemaker
Author
License
This project is licensed under the MIT License.
Copyright
(c) 2022, skriptfabrik GmbH
Informazioni sul progetto
HA Cluster manager configuration with pacemaker and corosync
Installa
ansible-galaxy install skriptfabrik.pacemaker
Licenza
mit
Download
2.2k
Proprietario