Skip to content
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

ANSIBLE_SSH_CONTROL_PATH_DIR option added #18342

Merged
merged 2 commits into from
Nov 3, 2016

Conversation

Shaps
Copy link
Contributor

@Shaps Shaps commented Nov 3, 2016

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ssh.py

ANSIBLE VERSION
ansible --version
ansible 2.3.0 (ssh_cp_option_fix_18325 e2f63cfa10) last updated 2016/11/03 17:14:11 (GMT +000)
  lib/ansible/modules/core: (detached HEAD 7cc4d3fe04) last updated 2016/11/03 16:38:01 (GMT +000)
  lib/ansible/modules/extras: (detached HEAD e4bc618956) last updated 2016/11/03 16:38:01 (GMT +000)
  config file =
  configured module search path = Default w/o overrides
SUMMARY

This removes the hardcoded value ( $HOME/.ansible/cp ) from ssh.py.
User is able to change the ControlPath directory ( the one that replaces %(directory)s ).

Fixes #18325

# ansible -vvvvvi hosts all -m ping
Using /root/.ansible.cfg as config file
[...]
<localhost> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/tmp/ansible/cp/ansible-ssh-%h-%p-%r)
[...]


# ansible -vvvvvi hosts all -m ping
No config file found; using defaults
[...]
<localhost> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/root/.ansible/cp/ansible-ssh-%h-%p-%r)
[...]

This removes the hardcoded value ( $HOME/.ansible/cp ) from ssh.py.
User is able to change the ControlPath directory ( the one that replaces %(directory)s ).

 Fixes ansible#18325
@abadger
Copy link
Contributor

abadger commented Nov 3, 2016

Implementation looks good. Need some documentation.

  • Add to examples/ansible.cfg with a short comment about what it does
  • Add an entry to docsite/rst/intro_configuration.rst This one can be done in a separate PR if you want so that we don't block dharmabumstead's queue and vice versa.

@abadger abadger added feature_pull_request affects_2.3 This issue/PR affects Ansible v2.3 labels Nov 3, 2016
@Shaps
Copy link
Contributor Author

Shaps commented Nov 3, 2016

Thanks @abadger, yes I forgot to add the ansible.cfg option. Added now.
I will open a separate PR for the docs

@abadger abadger merged commit b18263c into ansible:devel Nov 3, 2016
@abadger
Copy link
Contributor

abadger commented Nov 3, 2016

Merged to devel. Thanks @Shaps !

@abadger abadger added this to the 2.3.0 milestone Nov 3, 2016
@ansibot ansibot added feature This issue/PR relates to a feature request. and removed feature_pull_request labels Mar 4, 2018
@ansible ansible locked and limited conversation to collaborators Apr 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.3 This issue/PR affects Ansible v2.3 feature This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hardcoded $HOME/.ansible/cp; unexpected ControlPath behavior
3 participants