generated from linux-system-roles/template
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test support for qdevice tls and kaptb options
Support for these options is purely a pcs thing, there is no code update needed to be done in the role itself. This test demonstrates that the options are indeed supported by the role.
- Loading branch information
1 parent
a02d42f
commit 303973f
Showing
1 changed file
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# SPDX-License-Identifier: MIT | ||
--- | ||
- name: Test qdevice - tls and KAPTB options | ||
hosts: all | ||
vars_files: vars/main.yml | ||
vars: | ||
_required_capability: corosync.quorum.device.model.net.options_tls_and_kaptb | ||
|
||
tasks: | ||
- name: Set qnetd address | ||
set_fact: | ||
__test_qnetd_address: "{{ | ||
(ansible_play_hosts_all | length == 1) | ||
| ternary('localhost', ansible_play_hosts[0]) }}" | ||
|
||
- name: Fetch versions of cluster components | ||
include_tasks: tasks/fetch_versions.yml | ||
|
||
- name: Run test | ||
tags: tests::verify | ||
include_tasks: template_qdevice.yml | ||
when: | ||
- _required_capability in __test_pcs_capabilities | ||
vars: | ||
ha_cluster_quorum: | ||
device: | ||
model: net | ||
model_options: | ||
- name: host | ||
value: "{{ __test_qnetd_address }}" | ||
- name: algorithm | ||
value: lms | ||
- name: tls | ||
value: required | ||
- name: keep_active_partition_tie_breaker | ||
value: "on" | ||
__test_expected_lines: | ||
- "totem {" | ||
- " version: 2" | ||
- " cluster_name: {{ ha_cluster_cluster_name }}" | ||
- " transport: knet" | ||
- " crypto_cipher: aes256" | ||
- " crypto_hash: sha256" | ||
- "}" | ||
- "nodelist {" | ||
- "}" | ||
- "quorum {" | ||
- " provider: corosync_votequorum" | ||
- " device {" | ||
- " model: net" | ||
- " net {" | ||
- " algorithm: lms" | ||
- " host: {{ __test_qnetd_address }}" | ||
- " keep_active_partition_tie_breaker: on" | ||
- " tls: required" | ||
- " }" | ||
- " }" | ||
- "}" | ||
- "logging {" | ||
- " to_logfile: yes" | ||
- " logfile: /var/log/cluster/corosync.log" | ||
- " to_syslog: yes" | ||
- " timestamp: on" | ||
- "}" | ||
|
||
- name: Warn about skipped test | ||
debug: | ||
msg: This test needs pcs with {{ _required_capability }} capability | ||
when: | ||
- _required_capability not in __test_pcs_capabilities |