diff --git a/awx/main/tasks.py b/awx/main/tasks.py index 505172070c..f55962e371 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -878,7 +878,7 @@ class RunJob(BaseTask): authorize = network_cred.authorize env['ANSIBLE_NET_AUTHORIZE'] = unicode(int(authorize)) if authorize: - env['ANSIBLE_NET_AUTHORIZE_PASSWORD'] = decrypt_field(network_cred, 'authorize_password') + env['ANSIBLE_NET_AUTH_PASS'] = decrypt_field(network_cred, 'authorize_password') # Set environment variables related to scan jobs if job.job_type == PERM_INVENTORY_SCAN: diff --git a/awx/main/tests/unit/test_network_credential.py b/awx/main/tests/unit/test_network_credential.py index 7ae97fe76b..dd6a953fb9 100644 --- a/awx/main/tests/unit/test_network_credential.py +++ b/awx/main/tests/unit/test_network_credential.py @@ -46,7 +46,7 @@ def test_net_cred_parse(mocker): assert env['ANSIBLE_NET_USERNAME'] == options['username'] assert env['ANSIBLE_NET_PASSWORD'] == options['password'] assert env['ANSIBLE_NET_AUTHORIZE'] == '1' - assert env['ANSIBLE_NET_AUTHORIZE_PASSWORD'] == options['authorize_password'] + assert env['ANSIBLE_NET_AUTH_PASS'] == options['authorize_password'] def test_net_cred_ssh_agent(mocker, get_ssh_version):