ondrejhome / ondrejhome.ha_cluster / 1.0.2 / module / pcs_constraint_location wrapper module for 'pcs constraint location' | "added in version" 2.4 of ondrejhome.ha_cluster" Authors: Ondrej Famera (@OndrejHome) preview | supported by communityondrejhome.ha_cluster.pcs_constraint_location (1.0.2) — module
Install with ansible-galaxy collection install ondrejhome.ha_cluster:==1.0.2
collections: - name: ondrejhome.ha_cluster version: 1.0.2
module for creating and deleting clusters location constraints using 'pcs' utility
- name: resource resA prefers to run on node1 pcs_constraint_location: resource: 'resA' node_name: 'node1'
- name: remove constraint where resource resA prefers to run on node1 pcs_constraint_location: resource: 'resA' node_name: 'node1' state: 'absent'
- name: resource resB avoids running on node2 pcs_constraint_location: resource: 'resB' node_name: 'node2' score: '-INFINITY'
- name: remove constraint where resource resB avoids running on node2 pcs_constraint_location: resource: 'resB' node_name: 'node2' score: '-INFINITY' state: 'absent'
score: default: INFINITY description: - constraint score in range -INFINITY..0..INFINITY 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 resource: description: - resource for constraint required: true type: str node_name: description: - node name for constraints required: true type: str