1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/lib/ansible/modules/net_tools
Jordan Borean 8bdd04c147 Fix remote_tmp when become with non admin user (#42396)
* Fix tmpdir on non root become

 - also avoid exception if tmpdir and remote_tmp are None
 - give 'None' on deescalation so tempfile will fallback to it's default behaviour
   and use system dirs
 - fix issue with bad tempdir (not existing/not createable/not writeable)
   i.e nobody and ~/.ansible/tmp
 - added tests for blockfile case

* Revert "Temporarily revert c119d54"

This reverts commit 5c614a59a6.

* changes based on PR feedback and changelog fragment

* changes based on the review

* Fix tmpdir when makedirs failed so we just use the system tmp

* Let missing remote_tmp fail

If remote_tmp is missing then there's something more basic wrong in the
communication from the controller to the module-side.  It's better to
be alerted in this case than to silently ignore it.

jborean and I have independently checked what happens if the user sets
ansible_remote_tmp to empty string and !!null and both cases work fine.
(null is turned into a default value controller-side.  empty string
triggers the warning because it is probably not a directory that the
become user is able to use).
2018-07-06 10:49:19 -07:00
..
basics Fix remote_tmp when become with non admin user (#42396) 2018-07-06 10:49:19 -07:00
exoscale exo_dns_record: remove limitation for multiple records only for A type (#35173) 2018-02-05 22:40:02 +01:00
infinity Fix dangerous default args. (#29839) 2017-09-12 00:11:13 -07:00
ldap ldap_attr: Use byte values instead of str (#41248) 2018-06-08 07:34:49 +05:30
nios Metadata change to 'core' for 2.5 supported NIOS modules (#41244) 2018-06-07 16:27:05 +05:30
__init__.py Split modules/network into two parts (#24024) 2017-04-27 16:42:41 +01:00
cloudflare_dns.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
dnsimple.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
dnsmadeeasy.py Update dnsmadeeasy.py (#38731) 2018-04-20 15:42:42 +02:00
haproxy.py Fix python3 interpreter issue (#34811) (#35176) 2018-03-22 12:59:46 -07:00
ip_netns.py Add network namespace module (#21820) 2018-01-03 15:27:58 -05:00
ipify_facts.py Update metadata to 1.1 2017-08-15 23:12:08 -07:00
ipinfoio_facts.py Bulk autopep8 (modules) 2017-12-07 20:25:55 +00:00
lldp.py Clean up non-standard module shebangs. 2018-03-21 11:04:55 -07:00
nmcli.py fix typo in nmcli doc (#40116) 2018-05-15 07:52:59 +05:30
nsupdate.py nsupdate.py: Fix typo (#42209) 2018-07-02 13:03:37 -07:00
omapi_host.py Clean up module documentation (#36909) 2018-03-15 22:15:24 +01:00
snmp_facts.py Fix typo in if statement in snmp_facts module. (#39578) 2018-05-30 02:10:19 +02:00