-
-
Notifications
You must be signed in to change notification settings - Fork 435
Open
Description
Describe the bug
host.get_fact(TmpDir)
simply returns empty on most environments. server.script
operation fails due to this.
To Reproduce
-
Operation code & usage
# testtmpdir.py from pyinfra.context import host from pyinfra.facts.server import TmpDir print(host.get_fact(TmpDir))
Run with
pyinfra @local testtmpdir.py
-
Target system information
Tested on two computers
Linux xxx 6.16.8-arch2-1 #1 SMP PREEMPT_DYNAMIC ... x86_64 GNU/Linux
Linux xxx 6.8.0-79-generic #79~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC ... x86_64 x86_64 x86_64 GNU/Linux
-
Example using the
@docker
connector (helps isolate the problem)pyinfra @docker/ubuntu:22.04 testtmpdir.py
Expected behavior
I expect it to return /tmp
from the fact, from what I understand from the docs
Meta
N/A
The bug is simply due to the TEMPDIR
env variable not existing on most systems it seems.
https://github.com/pyinfra-dev/pyinfra/blob/3.x/src/pyinfra/facts/server.py#L60
Metadata
Metadata
Assignees
Labels
No labels