-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Use a -short- custom hash for controlpersist path by default #20843
Conversation
* First tries %C to use the shortened hash * On further failure, it removes section by section from the original path
Andrew Gaffney https://www.irccloud.com/pastebin/9uifJ9oc/ |
lib/ansible/constants.py
Outdated
@@ -333,6 +333,7 @@ def load_config_file(): | |||
# that it may be a security risk to do so. | |||
ANSIBLE_SSH_CONTROL_PATH = get_config(p, 'ssh_connection', 'control_path', 'ANSIBLE_SSH_CONTROL_PATH', u"%(directory)s/ansible-ssh-%%h-%%p-%%r") | |||
ANSIBLE_SSH_CONTROL_PATH_DIR = get_config(p, 'ssh_connection', 'control_path_dir', 'ANSIBLE_SSH_CONTROL_PATH_DIR', u'~/.ansible/cp') | |||
ANSIBLE_SSH_CONTROL_PATH_FIX = get_config(p, 'ssh_connection', 'control_path_fix', 'ANSIBLE_SSH_CONTROL_PATH_FIX', False, value_type='boolean') |
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.
Rather than set a fairly esoteric new config item, why not just change default control path to either be much shorter or use %C.
I just don't think this fix is that discoverable, and once you've discovered it, you may as well set the other values instead.
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.
@willthames the concern in #11536 was that %C is not supported by all ssh versions.
I also intend to make the option on by default once we've vetted the feature and have decided on the final config item name.
i'm thinking a better fix is defaulting to |
<@bcoca> Brian Coca jtanner: on ssh one ... reverse my comment, lets just default to ansible doing the hashing if config is empty and let user set config to override |
ISSUE TYPE
COMPONENT NAME
lib/ansible/plugins/connection/ssh.py
ANSIBLE VERSION
SUMMARY
Fixes #11536