Skip to content

Commit

Permalink
Merge pull request #36 from mib1185/add-support-for-rules-in-location…
Browse files Browse the repository at this point in the history
…-constraints

Add support for rules in location constraints. Thanks to Michael (@mib1185 ) for this contribution!
  • Loading branch information
OndrejHome authored Aug 8, 2024
2 parents bab7624 + 48ba9a5 commit 2d2358d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,25 @@ Role Variables

- Configure cluster location constraints (Not mandatory)

**node based**

```
cluster_constraint_location:
- resource: required
node_name: required
score: optional
```

**rule based** (_needs ondrejhome.pcs-modules-2 v30 or newer_)

```
cluster_constraint_location:
- resource: required
constraint_id: required
rule: required
score: optional
```

Security considerations
-----------------------

Expand Down
4 changes: 3 additions & 1 deletion tasks/cluster_constraint_location.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
pcs_constraint_location:
resource: "{{ item.resource }}"
state: "{{ item.state | default(omit) }}"
node_name: "{{ item.node_name }}"
node_name: "{{ item.node_name | default(omit) }}"
rule: "{{ item.rule | default(omit) }}"
constraint_id: "{{ item.constraint_id | default(omit) }}"
resource1_role: "{{ item.resource1_role | default(omit) }}"
resource2_role: "{{ item.resource2_role | default(omit) }}"
score: "{{ item.score | default(omit) }}"
Expand Down

0 comments on commit 2d2358d

Please sign in to comment.