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

Fix for issue @synchronize doesn't substitute variables properly #16347 #16349

Merged
merged 2 commits into from Aug 4, 2016
Merged

Fix for issue @synchronize doesn't substitute variables properly #16347 #16349

merged 2 commits into from Aug 4, 2016

Conversation

ovcharenko
Copy link
Contributor

ISSUE TYPE

  • Bugfix Pull Request
ANSIBLE VERSION
ansible 2.1.0.0
  config file = /tmp/ansible.cfg
  configured module search path = Default w/o overrides
SUMMARY

Fixes #16347: use proper ansible_ssh_private_key_file formatting.

Now test playbook works just fine:
$ ansible-playbook test.yaml

PLAY [SSH test] ****************************************************************

TASK [setup] *******************************************************************
ok: [XXX.compute-1.amazonaws.com]

TASK [ping] ********************************************************************
ok: [XXX.compute-1.amazonaws.com -> localhost]

TASK [synchronize] *************************************************************
changed: [XXX.compute-1.amazonaws.com]

PLAY RECAP *********************************************************************
XXX.compute-1.amazonaws.com : ok=3    changed=1    unreachable=0    failed=0

@ovcharenko
Copy link
Contributor Author

Wish we had faster development here...

@tima
Copy link
Contributor

tima commented Aug 1, 2016

Sorry @ovcharenko been kind of buried here to test this. Trying to verify it myself now and with the core team.


if private_key is not None:
private_key = os.path.expanduser(private_key)
private_key = format(os.path.expanduser(private_key))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of using format() here? Is it adding anything useful?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could be removed.

@abadger
Copy link
Contributor

abadger commented Aug 2, 2016

@bcoca looked at the first part of the fix and thinks that it is correct to look in play_context for the value so that seems correct.

The format() portion seems like it won't do anything here. So maybe that's just been left in from debugging and should be removed?

@abadger abadger added the needs_info This issue requires further information. Please answer any outstanding questions. label Aug 2, 2016
@abadger abadger merged commit f326e49 into ansible:devel Aug 4, 2016
@abadger abadger removed the needs_info This issue requires further information. Please answer any outstanding questions. label Aug 4, 2016
abadger pushed a commit that referenced this pull request Aug 4, 2016
… (#16349)

* Fix for issue @synchronize doesn't substitute variables properly #16347
@ovcharenko ovcharenko deleted the DE_16347 branch August 16, 2016 14:08
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bugfix_pull_request labels Mar 5, 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
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

synchronize doesn't substitute variables properly
5 participants