Skip to content

Commit 61cfa17

Browse files
authored
[MMA-17623] - adding skip tag for c3 next gen host count validation (#2272)
* adding skip tag for c3 next gen host count * using variable instead of tag * fixing config * added better message as well * adding docs string
1 parent 112fd2f commit 61cfa17

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

docs/VARIABLES.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -740,6 +740,14 @@ Default: false
740740

741741
***
742742

743+
### skip_control_center_next_gen_host_count_validation
744+
745+
Boolean to skip Control Center Next Gen host count validation. Set to true to skip validation that requires exactly one Control Center Next Gen host.
746+
747+
Default: false
748+
749+
***
750+
743751
### user_login_shell
744752

745753
Variable to set the user login shell for all custom user created per component by cp-ansible.

roles/common/tasks/config_validations.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,11 @@
375375
- c3_host_count | int == 1
376376
fail_msg: >-
377377
Please ensure your 'control_center_next_gen' group or default resolves to a single host.
378-
success_msg: "The list of resolved Control Center Next Gen hosts correctly contains a single entry."
378+
success_msg: "The list of resolved Control Center Next Gen hosts correctly contains a single entry. To skip this validation, set skip_control_center_next_gen_host_count_validation: true."
379379
when:
380380
- "'control_center_next_gen' in groups"
381381
- "groups['control_center_next_gen'] | length > 0"
382+
- not skip_control_center_next_gen_host_count_validation|bool
382383
tags:
383384
- validate
384385

roles/variables/defaults/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,9 @@ validate_hosts: true
317317
### Boolean used for disabling of systemd service restarts when rootless install is executed
318318
skip_restarts: false
319319

320+
### Boolean to skip Control Center Next Gen host count validation. Set to true to skip validation that requires exactly one Control Center Next Gen host.
321+
skip_control_center_next_gen_host_count_validation: false
322+
320323
### Variable to set the user login shell for all custom user created per component by cp-ansible.
321324
user_login_shell: /sbin/nologin
322325

0 commit comments

Comments
 (0)