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

provisioners/ansible: show ansible-playbook in use #3628

Merged
merged 1 commit into from May 5, 2014

Conversation

gildegoma
Copy link
Collaborator

Motivation:

By printing out the ansible command used behind the scene, we can certainly ease
the "support effort" (IRC, Mailing list and Gitub Issues of both projects, Vagrant and Ansible) to quickly identify whether a problem is due to Vagrant provisioner or Ansible itself.

@@ -66,6 +66,8 @@ def provision
# Support Multiple SSH keys and SSH forwarding:
env["ANSIBLE_SSH_ARGS"] = ansible_ssh_args unless ansible_ssh_args.empty?

show_ansible_playbook_command(env, command) if config.verbose
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought it makes sense to "reuse" this option, but following variants would also makes sense:

  • always show the command (even if ansible.verbose is false)
  • add a new option, specific to this new "feature" (i.e. ansible.show_ansible_playbook_command)

The current solution seems to me a good "trade off", but it is up to you @mitchellh :)

Motivation:
By printing out the ansible command used behind the scene, we can ease
the support effort to very quickly identify whether a problem is due to
Vagrant provisioner or Ansible itself.
@gildegoma
Copy link
Collaborator Author

@mitchellh Okay, unit tests are now fixed. Ready for your review.

@mitchellh
Copy link
Contributor

ThisLGTM as is. Thanks! :)

mitchellh added a commit that referenced this pull request May 5, 2014
provisioners/ansible: show ansible-playbook in use
@mitchellh mitchellh merged commit 925eb47 into hashicorp:master May 5, 2014
@gildegoma gildegoma deleted the ansible-show-cmd branch May 5, 2014 07:45
@hashicorp hashicorp locked and limited conversation to collaborators Apr 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants