From 4ef7699f1a9987bf8993ba28acc2ea4dc55f252c Mon Sep 17 00:00:00 2001 From: Ryan Kraus Date: Tue, 1 Dec 2020 17:10:39 -0500 Subject: [PATCH] Fixed support for missing proxy settings. This helps address #97 --- app/inventory.py | 6 +++++- home/.bashrc | 7 +++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/inventory.py b/app/inventory.py index 2ecd448..71c4477 100755 --- a/app/inventory.py +++ b/app/inventory.py @@ -164,7 +164,11 @@ def __getitem__(self, key): def get(self, key, default=None): self._last_key = key - return os.environ.get(key, default).replace('\\n', '\n') + val = os.environ.get(key, default) + try: + return val.replace('\\n', '\n') + except AttributeError: + return val @property def error(self): diff --git a/home/.bashrc b/home/.bashrc index e861f82..d117090 100644 --- a/home/.bashrc +++ b/home/.bashrc @@ -18,4 +18,11 @@ export _CONFIG_LAST_LOAD="0" export PROMPT_COMMAND=ps1 export KUBECONFIG=/data/openshift-installer/auth/kubeconfig +PYTHONPATH=/app/lib/python,/deps/python +PYTHONUSERBASE=/deps/python +ANSIBLE_COLLECTIONS_PATH=/deps/ansible +PATH=/deps/python/bin:$PATH + + + alias ll='ls -la'