From 8eb502e9529d9066704af9ab530a997ac7fa081a Mon Sep 17 00:00:00 2001 From: dblugeon Date: Wed, 16 Mar 2022 14:50:55 +0100 Subject: [PATCH] Fix crash of mssql_conf during setup with the MSSQL 2019 cu15 Hello everybody, In the CU15 (15.0.4198.2), the mssql-conf tool was rewrited. With this sqlserver's update and the old version of mssql_conf, we get an error "usermod command not found" during the checkinstance.sh's execution. This fix adds a merge operation of setup_env dictionary with the MSSQL_SA_PASSWORD and MSSQL_PID variables --- .../Linux/Ansible Playbook/library/mssql_conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/features/high availability/Linux/Ansible Playbook/library/mssql_conf.py b/samples/features/high availability/Linux/Ansible Playbook/library/mssql_conf.py index 6ae2e0e2..a62fee8a 100644 --- a/samples/features/high availability/Linux/Ansible Playbook/library/mssql_conf.py +++ b/samples/features/high availability/Linux/Ansible Playbook/library/mssql_conf.py @@ -125,9 +125,10 @@ def main(): changed = False if need_to_set_up: setup_env = os.environ.copy() + setup_env.update({ 'MSSQL_SA_PASSWORD': setup_sa_password, 'MSSQL_PID': setup_pid }) subprocess.check_call( ['/opt/mssql/bin/mssql-conf', '--noprompt', 'setup', 'accept-eula'], - env = { 'MSSQL_SA_PASSWORD': setup_sa_password, 'MSSQL_PID': setup_pid }) + env = setup_env) if name is not None: subprocess.check_call(['/opt/mssql/bin/mssql-conf', '--noprompt', 'set', name, value])