Closed snapeuh closed 8 months ago
I came accross this answer by @Fizzadar on reddit :
This should indeed work! I replied on GitHub; in short the auth escalation arguments sudo_user/su_user require the users to exist before running pyinfra.
But then I don't understand how the provided example should be working ?
Thanks for the help !
🤦 the regex here has an extra colon on the end: https://github.com/pyinfra-dev/pyinfra/blob/7540c41fa0284b8dd80dcbea24d3616414484d60/pyinfra/api/facts.py#L40
Fixed: https://github.com/pyinfra-dev/pyinfra/commit/924e6444cbedbd125f7baa048600ef74d5c36ad2, released in v2.9.1 just now.
Hey,
I am using pyinfra to provision our servers to host our app and there is a recurring problem I bump into that I cannot understand how to bypass unless creating two .py and run them one by one.
Here's my code :
Which looks a lot like the example provided in the doc : https://github.com/pyinfra-dev/pyinfra/blob/2.x/examples/postgresql.py
However, when doing this I got this error :
It tries to get fact about an user that isn't created yet but will be created. How to effectively deal with this ?
Thanks a lot.