From 4be7b3c97567d59879249c837010648541d69df7 Mon Sep 17 00:00:00 2001 From: Tomas Jelinek Date: Wed, 4 Dec 2024 10:03:20 +0100 Subject: [PATCH] fix: rename the variable for exporting configuration --- README.md | 18 +++++++++--------- defaults/main.yml | 2 +- examples/export.yml | 2 +- tasks/main.yml | 2 +- tests/tests_cluster_advanced_knet_full.yml | 2 +- tests/tests_cluster_advanced_knet_implicit.yml | 2 +- tests/tests_cluster_advanced_udp_full.yml | 2 +- tests/tests_cluster_basic.yml | 2 +- tests/tests_cluster_basic_disabled.yml | 2 +- tests/tests_cluster_destroy.yml | 2 +- tests/tests_export_doesnt_destroy_cluster.yml | 4 ++-- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 39f6ca8..77f636b 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ ansible-galaxy collection install -r meta/collection-requirements.yml ### Defined in `defaults/main.yml` -#### `ha_cluster_get_info` +#### `ha_cluster_export_configuration` boolean, default: `false` @@ -1600,17 +1600,17 @@ may not be present in the export. ones. To export current cluster configuration and store it in `ha_cluster_facts` -variable, run the role with `ha_cluster_get_info: true`. This triggers the -export once the role finishes configuring a cluster or a qnetd host. If you -want to trigger the export without modifying existing configuration, run the -role like this: +variable, run the role with `ha_cluster_export_configuration: true`. This +triggers the export once the role finishes configuring a cluster or a qnetd +host. If you want to trigger the export without modifying existing +configuration, run the role like this: ```yaml - hosts: node1 vars: ha_cluster_cluster_present: null ha_cluster_qnetd: null - ha_cluster_get_info: true + ha_cluster_export_configuration: true roles: - linux-system-roles.ha_cluster @@ -1618,7 +1618,7 @@ role like this: **Note:** By default, `ha_cluster_cluster_present` is set to `true` and `ha_cluster_qnetd.present` is set to `false`. If you do not set the variables as -show in the example above, the role will reconfigure your cluster on the +shown in the example above, the role will reconfigure your cluster on the specified hosts, remove qnetd configuration from the specified hosts, and then export configuration. @@ -1633,7 +1633,7 @@ module like this: vars: ha_cluster_cluster_present: null ha_cluster_qnetd: null - ha_cluster_get_info: true + ha_cluster_export_configuration: true roles: - linux-system-roles.ha_cluster @@ -1653,7 +1653,7 @@ around it: vars: ha_cluster_cluster_present: null ha_cluster_qnetd: null - ha_cluster_get_info: true + ha_cluster_export_configuration: true roles: - linux-system-roles.ha_cluster diff --git a/defaults/main.yml b/defaults/main.yml index f26fd7a..14d0f96 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -76,4 +76,4 @@ ha_cluster_qnetd: regenerate_keys: false start_on_boot: true -ha_cluster_get_info: false +ha_cluster_export_configuration: false diff --git a/examples/export.yml b/examples/export.yml index 6699904..b952bb5 100644 --- a/examples/export.yml +++ b/examples/export.yml @@ -5,7 +5,7 @@ vars: ha_cluster_cluster_present: null ha_cluster_qnetd: null - ha_cluster_get_info: true + ha_cluster_export_configuration: true roles: - linux-system-roles.ha_cluster diff --git a/tasks/main.yml b/tasks/main.yml index 910789b..304f6f8 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -134,7 +134,7 @@ - name: Export configuration when: - - ha_cluster_get_info | bool + - ha_cluster_export_configuration | bool - ha_cluster_pacemaker_shell == "pcs" block: - name: Fetch configuration diff --git a/tests/tests_cluster_advanced_knet_full.yml b/tests/tests_cluster_advanced_knet_full.yml index e5d156f..b98885f 100644 --- a/tests/tests_cluster_advanced_knet_full.yml +++ b/tests/tests_cluster_advanced_knet_full.yml @@ -4,7 +4,7 @@ hosts: all vars_files: vars/main.yml vars: - ha_cluster_get_info: true + ha_cluster_export_configuration: true ha_cluster_cluster_name: test-cluster ha_cluster_transport: type: knet diff --git a/tests/tests_cluster_advanced_knet_implicit.yml b/tests/tests_cluster_advanced_knet_implicit.yml index 391c90c..f6f1297 100644 --- a/tests/tests_cluster_advanced_knet_implicit.yml +++ b/tests/tests_cluster_advanced_knet_implicit.yml @@ -4,7 +4,7 @@ hosts: all vars_files: vars/main.yml vars: - ha_cluster_get_info: true + ha_cluster_export_configuration: true ha_cluster_cluster_name: test-cluster ha_cluster_transport: crypto: diff --git a/tests/tests_cluster_advanced_udp_full.yml b/tests/tests_cluster_advanced_udp_full.yml index 87b448e..38d12f7 100644 --- a/tests/tests_cluster_advanced_udp_full.yml +++ b/tests/tests_cluster_advanced_udp_full.yml @@ -4,7 +4,7 @@ hosts: all vars_files: vars/main.yml vars: - ha_cluster_get_info: true + ha_cluster_export_configuration: true ha_cluster_cluster_name: test-cluster ha_cluster_transport: type: udp diff --git a/tests/tests_cluster_basic.yml b/tests/tests_cluster_basic.yml index 2fb21d4..fed578d 100644 --- a/tests/tests_cluster_basic.yml +++ b/tests/tests_cluster_basic.yml @@ -5,7 +5,7 @@ vars_files: vars/main.yml vars: ha_cluster_cluster_name: test-cluster - ha_cluster_get_info: true + ha_cluster_export_configuration: true tasks: - name: Run test diff --git a/tests/tests_cluster_basic_disabled.yml b/tests/tests_cluster_basic_disabled.yml index c04593b..fe09108 100644 --- a/tests/tests_cluster_basic_disabled.yml +++ b/tests/tests_cluster_basic_disabled.yml @@ -6,7 +6,7 @@ vars: ha_cluster_cluster_name: test-cluster ha_cluster_start_on_boot: false - ha_cluster_get_info: true + ha_cluster_export_configuration: true tasks: - name: Run test diff --git a/tests/tests_cluster_destroy.yml b/tests/tests_cluster_destroy.yml index 2d17aaf..03df8d2 100644 --- a/tests/tests_cluster_destroy.yml +++ b/tests/tests_cluster_destroy.yml @@ -3,7 +3,7 @@ - name: Deconfigure cluster hosts: all vars: - ha_cluster_get_info: true + ha_cluster_export_configuration: true ha_cluster_cluster_present: false tasks: diff --git a/tests/tests_export_doesnt_destroy_cluster.yml b/tests/tests_export_doesnt_destroy_cluster.yml index 7b67d05..eef0bd6 100644 --- a/tests/tests_export_doesnt_destroy_cluster.yml +++ b/tests/tests_export_doesnt_destroy_cluster.yml @@ -42,7 +42,7 @@ vars: ha_cluster_cluster_present: null ha_cluster_qnetd: null - ha_cluster_get_info: true + ha_cluster_export_configuration: true - name: Compare expected and exported configuration 1 assert: @@ -57,7 +57,7 @@ vars: ha_cluster_cluster_present: null ha_cluster_qnetd: null - ha_cluster_get_info: true + ha_cluster_export_configuration: true - name: Compare expected and exported configuration 2 assert: