manage_local_ldap_account playbook argument "mode" does not have default value
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Low
|
Karla Felix |
Bug Description
Brief Description
As per documentation at https:/
Severity
Minor
Steps to Reproduce
Execute playbook command:
ansible-playbook --inventory secure-inventory --ask-vault-pass --extra-
Expected Behavior
Executes with no errors
Actual Behavior
The following error shows:
TASK [Validate in_mode] *******
Thursday 27 April 2023 15:58:16 +0000 (0:00:00.037) 0:00:00.059 ********
fatal: [systemcontroll
msg: |-
The conditional check 'in_mode not in ['create', 'delete']' failed. The error was: error while evaluating conditional (in_mode not in ['create', 'delete']): 'in_mode' is undefined
The error appears to be in '/usr/share/
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
name: Validate in_mode
^ here
Reproducibility
100%
System Configuration
AIO-SX and DC system
Load info
Workaround
Argument "mode" needs a value.
Changed in starlingx: | |
assignee: | nobody → Karla Felix (kkarolin) |
Changed in starlingx: | |
status: | New → In Progress |
Changed in starlingx: | |
importance: | Undecided → Low |
tags: | added: stx.9.0 stx.config stx.security |
Reviewed: https:/ /review. opendev. org/c/starlingx /ansible- playbooks/ +/886002 /opendev. org/starlingx/ ansible- playbooks/ commit/ 369295187101573 3e5eca9bac7313e 9c791a0a2a
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit 369295187101573 3e5eca9bac7313e 9c791a0a2a
Author: Karla Felix <email address hidden>
Date: Tue Jun 13 11:28:18 2023 -0300
Refactoring manage_ local_ldap_ account inputs
Refactoring manage_ local_ldap_ account input params, validations for "password_ change_ period, password warning_period, protected" ), adding the default values for "mode", and fixed
params(
sys_
password validation.
Test Plan:
PASS: Run "manage_ local_ldap_ account" and pass all validations. local_ldap_ account" with custom values for
"password_ change_ period" and "password_ warning_ period" local_ldap_ account" with custom values that
'sudo_ permission= yes', 'sys_protected= yes', log in the
'sudo_ permission= yes', 'sys_protected= yes', log in the
'sudo_ permission' and 'sys_protected' and check that local_ldap_ account" without a value in
PASS: Run "manage_
and verify if the validation was OK.
PASS: Run "manage_
shouldn't be accepted and verify if the validation will
fail.
PASS: Try to input values out of the pre-defition and verify if
the default value was added to the variables.
PASS: In a DC environment with one subcloud, successfully execute
the playbook with extra vars 'user_id=user8', 'mode=create',
subcloud using the new user, check that it is part of
groups [users root sys_protected], source its openrc file
and execute 'system host-list' command.
PASS: In a AIO-SX environment, successfully execute the playbook
with extra vars 'user_id=user5', 'mode=create',
subcloud using the new user, check that it is part of
groups [user root sys_protected], source its openrc file
and execute 'system host-list' command.
PASS: Repeat the last two tests without the variables
the new user is only part of groups [users].
PASS: Run "manage_
'mode', and verify if the default value 'create' is
applied.
Closes-Bug: 2024259
Change-Id: I4039af86c9a692 0818c1c26538eae 6967b05ed9e
Signed-off-by: Karla Felix <email address hidden>