From 9f4804357485fc88d5959f3cb7c14096b438c1b5 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Fri, 16 Dec 2016 12:21:41 -0500 Subject: [PATCH] Fix env var. --- awx/main/tasks.py | 2 +- awx/main/tests/unit/test_network_credential.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/awx/main/tasks.py b/awx/main/tasks.py index de69a3ecd5..84231da6c3 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -876,7 +876,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):