-
Notifications
You must be signed in to change notification settings - Fork 24k
Add ssh-agent launching, and ssh-agent python client #82181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
FTR, I've started a review draft, will post once I get to completing it.. |
@@ -161,13 +165,59 @@ def __init__(self, loader, sources=None, parse=True, cache=True): | |||
else: | |||
self._sources = sources | |||
|
|||
self._launch_ssh_agent() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this belongs does in prefork but not this early, move to strategy? (really in a connection manager as part or execution engine) as inventory does not require connection to the hosts at all. It can provide the info but should not be in charge of setting up communications or their prereqs. The good thing is that this code is easy to move later on, so I do not think it is a blocker for the PR right now.
env: | ||
- name: ANSIBLE_PRIVATE_KEY | ||
vars: | ||
- name: ansible_private_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add ansible_ssh_private_key
options with higher precedence than the generic, this way we can reuse for other plugins and still have 'plugin specific' option to override or distinguish
version_added: '2.17' | ||
private_key_passphrase: | ||
description: | ||
- private key passphrase, dependent on ``private_key``. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to reinforce, mention it does NOT work with private_key_file
1667889
to
79ab013
Compare
This comment was marked as outdated.
This comment was marked as outdated.
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Closing in favor of #84754 where this feature is being completed. |
SUMMARY
This PR adds:
InventoryManager
to spawn anssh-agent
process, or re-use an existingssh-agent
processssh-agent
client for interacting with anssh-agent
socket, for management of keys, as well as locking and unlocking the agentISSUE TYPE
ADDITIONAL INFORMATION
Related: https://datatracker.ietf.org/doc/html/draft-miller-ssh-agent
Notes:
Supersedes #52739.