Emcli command not working through ansible playbook

Hi Team,
emcli commands are used in ansible playbook and it is output properly but when testing it OMS server (OEM installed server). it is thrown an error and also GUI getting error.

Error:
[oracle@itlxprddb02 ~]$ /opt/oracle/product/em/em1350/bin/emcli sync
Synchronized successfully
[oracle@itlxprddb02 ~]$
[oracle@itlxprddb02 ~]$ /opt/oracle/product/em/em1350/bin/emcli test_named_credential -cred_names=DSCRDEV_SYSTEM_NORMAL -target_name=dscrdev -target_type=oracle_database
Credential test failed for dscrdev:oracle_database
Authentication failed ORA-01017: invalid username/password; logon denied

The Connect Descriptor was (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = orarheldev02.exelixis.com)(PORT = 1522))(CONNECT_DATA = (SID = dscrdev)(SERVER = DEDICATED)))

Ansible script:
for cred in {{ clean_named_cred_list_oms | join(’ ‘) }}; do
if [[ “${cred^^}” == “${named_cred^^}” ]]; then
match_cred=“$cred”
echo “$match_cred”
/opt/oracle/product/em/em1350/bin/emcli logout > /dev/null 2>&1
/opt/oracle/product/em/em1350/bin/emcli login -username={{ oms_user }} -password={{ oms_pwd }}
/opt/oracle/product/em/em1350/bin/emcli sync
/opt/oracle/product/em/em1350/bin/emcli clear_cache
/opt/oracle/product/em/em1350/bin/emcli sync
db_name_cred=$(echo “$match_cred” | cut -d’_’ -f1)
ACTUAL_TARGET_CRED=$(/opt/oracle/product/em/em1350/bin/emcli get_targets | awk -v tname=“$db_name_cred” ‘$3 == “{{ oms_target_type }}” && tolower($4) == tolower(tname) {print $4}’ | head -1)
NAMED_CRED_OUTPUT=$(/opt/oracle/product/em/em1350/bin/emcli modify_named_credential -cred_name=$match_cred -attributes=“DBUserName:{{ db_user }};DBPassword:‘{{ item.new_password }}’;DBRole:normal” 2>&1)
/opt/oracle/product/em/em1350/bin/emcli sync
NAME_CRED_TEST_OUTPUT=$(/opt/oracle/product/em/em1350/bin/emcli test_named_credential -cred_names=$match_cred -target_name=$ACTUAL_TARGET_CRED -target_type=“{{ oms_target_type }}” 2>&1)
if echo $NAMED_CRED_OUTPUT | grep -qi “error” || echo $NAMED_CRED_TEST_OUTPUT | grep -qi “error” ; then
modify_status=“failed”
else
modify_status=“success”
fi
fi
done

output of ansible playbook:

“stdout_lines”: [
“Login successful”,
“Synchronized successfully”,
“DBATEST_SYSTEM_NORMAL”,
“Login successful”,
“Synchronized successfully”,
“system update status: success - named cred modify status: success”,
"system user output:- Successfully submitted a job to change the password in Enterprise Manager and on the target database: "dbatest" “,
“Execute "emcli get_jobs -job_id=408009BBE51517E1E06351041DACF1AC" to check the status of the job. “,
“Search for job name "CHANGE_PWD_JOB_1759764228581" on the Jobs home page to check job execution details.”,
“named cred output:- Credential updated.”,
“name cred test output:- Credentials "DBATEST_SYSTEM_NORMAL:SYSMAN" tested successfully”,
“{”,
" "ARN": "arn:aws:secretsmanager:us-west-2:161066317442:secret:oracle_common_system_current-ssCPuy",”,
" "Name": "oracle_common_system_current",”,
" "VersionId": "73834a98-cc11-4e4d-bd44-cd82d7c2fd25"”,
“}”,
“dbname:dbatest,dbtype:N,current_password:uQ#OeSk##lJwIm#r#8HnFgr9”
]