pyinfra
pyinfra copied to clipboard
Set context before calling use_sudo_password()
Set context before calling use_sudo_password()
in case it wants access
to host data. A use case is setting the sudo password in group data
files, and then later providing it via config.USE_SUDO_PASSWORD. e.g.
config.USE_SUDO_PASSWORD = lambda: host.data.sudo_password
Codecov Report
Merging #868 (62845e7) into 2.x (5fedec4) will decrease coverage by
0.00%
. The diff coverage is50.00%
.
@@ Coverage Diff @@
## 2.x #868 +/- ##
==========================================
- Coverage 91.68% 91.67% -0.01%
==========================================
Files 122 122
Lines 7580 7583 +3
==========================================
+ Hits 6950 6952 +2
- Misses 630 631 +1
Impacted Files | Coverage Δ | |
---|---|---|
pyinfra/connectors/util.py | 89.54% <50.00%> (-1.13%) |
:arrow_down: |
pyinfra/api/operations.py | 84.81% <0.00%> (+0.52%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@jaysoffian I have just merged in https://github.com/Fizzadar/pyinfra/commit/591ea61e3b29210ccb5ac71665920f1374a51e18 which I believe solves this issue (and any other host state needs within operation execution context).
@jaysoffian I have just merged in 591ea61 which I believe solves this issue (and any other host state needs within operation execution context).
Indeed. Thanks!