Skip to content

Conversation

@philippemilink
Copy link
Contributor

To tell all hosts in the inventory uses the same password, which will be prompted only once.

In my setup, all SSH hosts of my inventory have the same sudo password. The problem is that when I run an operation which requires sudo on all my inventory, I am prompted to give the sudo password for each host, and all the prompts are somehow mixed on the same line:
pyinfra-sudo-1
pyinfra-sudo-2

I don't want to put the sudo password as a parameter of pyinfra command (to avoid leaking it in my shell history), but rather I want to be prompted, but only once.

So this PR adds the option --same-sudo-password to prompt for sudo password only once at the beginning of the execution.

  • Pull request is based on the default branch (3.x at this time)
  • Pull request includes tests for any new/updated operations/facts => any hint (where to look for inspiration) to add the corresponding test would be welcome
  • Pull request includes documentation for any new/updated operations/facts => where should I mention this option in the documentation?
  • Tests pass (see scripts/dev-test.sh)
  • Type checking & code style passes (see scripts/dev-lint.sh)

To tell all hosts in the inventory uses the same password, which will be
prompted only once.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant