Questions tagged [pyinfra]
For questions related to the pyinfra python library.
7
questions
0
votes
0
answers
186
views
SSH timeout not taken into account when using a ProxyJump
I would like to reduce the connection timeout error when connecting to my hosts with pyinfra, through a ProxyJump
The ~/.ssh/config file is properly set on my host:
Host sshJump
HostName myhost.com
...
2
votes
1
answer
456
views
Pyinfra - host/config objects
I was trying to run through some of the examples from pyinfra's docs to see if this tool would work for me (so I could manage some servers using good old Python) and I even found they had an example ...
1
vote
0
answers
399
views
Pyinfra run python code inside target host
What would be the most appropriate way to execute arbitrary python code inside the target host ?
I saw the operations.python which use "the context of a deploy". The context seem to be an ...
1
vote
1
answer
288
views
pyinfra: how to know when an operation causes a change
Sometimes, you need to run more commands if one command causes a change on the remote system. Good examples would be:
You update a systemd service file. If the file was actually changed, then you ...
1
vote
1
answer
130
views
Pyinfra missing positional argument
According to the docs, https://docs.pyinfra.com/en/1.x/facts/server.html#server-linuxname, I should be able to call host.get_fact(LinuxName) as it is, but when I do, it is complaining about a position ...
0
votes
0
answers
377
views
Pyinfra Forwarding SSH Agent
I'm using pyinfra to run some script on server X that rsyncs some files from server Y. However I'm getting a Permission denied (publickey). error as the public key of X is not on Y.
Is there a way to ...
2
votes
2
answers
503
views
How to include custom modules in pyinfra?
I'm using pyinfra to provision some files. I would like to know the best place to put custom modules.
Example
Given a custom fact that returns True if a system is not headless:
class HasGui(FactBase):...