From 6eacfecb73703bb1a90b0ea37ecd18ccfaa8c00a Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 25 Jul 2018 12:02:40 -0700 Subject: [PATCH] ANSIBLE_REMOTE_TMP was an implementation of unified temp that was later changed One of the earlier implementation of unified temp for 2.4 passed the temp diretory to the remote side using this environment variable. We later changed it to be passed via a module parameter but forgot to remove the environment variable. --- .../fragments/remove-unused-ansible-remote-temp.yaml | 10 ++++++++++ lib/ansible/plugins/action/__init__.py | 2 -- 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/remove-unused-ansible-remote-temp.yaml diff --git a/changelogs/fragments/remove-unused-ansible-remote-temp.yaml b/changelogs/fragments/remove-unused-ansible-remote-temp.yaml new file mode 100644 index 00000000000..4243d4838eb --- /dev/null +++ b/changelogs/fragments/remove-unused-ansible-remote-temp.yaml @@ -0,0 +1,10 @@ +--- +minor_changes: +- In Ansible-2.4 and above, Ansible passes the temporary directory a module + should use to the module. This is done via a module parameter + (_ansible_tmpdir). An earlier version of this which was also prototyped in + Ansible-2.4 development used an environment variable, ANSIBLE_REMOTE_TMP to + pass this information to the module instead. When we switched to using + a module parameter, the environment variable was left in by mistake. + Ansible-2.7 removes that variable. Any third party modules which relied on + it should use the module parameter instead. diff --git a/lib/ansible/plugins/action/__init__.py b/lib/ansible/plugins/action/__init__.py index 9bc27931ebc..3460d5be392 100644 --- a/lib/ansible/plugins/action/__init__.py +++ b/lib/ansible/plugins/action/__init__.py @@ -321,8 +321,6 @@ class ActionBase(with_metaclass(ABCMeta, object)): self._connection._shell.tmpdir = rc - if not become_unprivileged: - self._connection._shell.env.update({'ANSIBLE_REMOTE_TMP': self._connection._shell.tmpdir}) return rc def _should_remove_tmp_path(self, tmp_path):