question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamic config constants (Global to auto fill sudo password for every pyinfra call.)

See original GitHub issue

Is your feature request related to a problem? Please describe. I am frustrated when I have to explicitly pass use_sudo_password= with every pyinfra call for scripts I do not want to run as root.

Describe the solution you’d like Add another global to do this for me or allow USE_SUDO_PASSWORD to be set to the password for the current session which would emulate passing use_sudo_password= for all pyinfra calls.

Thanks.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
gnatcommented, May 2, 2021

Ah, I see. I love the idea of the local config.py or a config override object!

1reaction
gnatcommented, Nov 14, 2021

SUPER NICE change! Using in production now @Fizzadar

Read more comments on GitHub >

github_iconTop Results From Across the Web

sudo password · Issue #305 · Fizzadar/pyinfra - GitHub
Will have the follow this process for each individual command, and add a global sudo_password argument to all operations. 1
Read more >
Global Arguments — pyinfra documentation
_sudo_user : Execute/apply any changes with sudo as a non-root user. ... _use_sudo_password=False : Whether to use a password with sudo (will ask)....
Read more >
Getting Started with Ansible | Hacker News
I have a separate playbook called 'provision' that, among other things, creates an unprivileged user, gives it sudo permissions, disables root ...
Read more >
How to run SUDO commands without typing a password
This is a quick tutorial on how to run SUDO commands without typing a password everytime.Not a whole lot to this tutorial.... sudo...
Read more >
Most Pythonic way to provide global configuration variables in ...
So ´config´ would be an external JSON / YAML file which you have to load from disk every time you want to access...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found