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 ansible_password #9350

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

gamethis
Copy link
Contributor

@gamethis gamethis commented Jun 2, 2020

Second Go at this.

This will ensure that if user adds ansible_password to their args that it is not overridden by provisioner.

Changes

https://github.com/gamethis/packer/blob/fix_ansiblepassword/provisioner/ansible/provisioner.go#L573 is to help further address #5412

@codecov
Copy link

codecov bot commented Jun 2, 2020

Codecov Report

Merging #9350 into master will increase coverage by 0.00%.
The diff coverage is 80.00%.

Impacted Files Coverage Δ
provisioner/ansible/provisioner.go 40.55% <80.00%> (+0.88%) ⬆️
packer/plugin/client.go 80.35% <0.00%> (+0.44%) ⬆️
packer/communicator.go 75.53% <0.00%> (+1.06%) ⬆️

@gamethis gamethis changed the title Fix for #9283 Fix for ansible_password Jun 2, 2020
@gamethis
Copy link
Contributor Author

gamethis commented Jun 2, 2020

@SwampDragons second go new approach

Copy link
Contributor

@SwampDragons SwampDragons left a comment

Choose a reason for hiding this comment

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

I like this and I think it looks pretty clean. Thanks for opening!

@@ -779,3 +791,15 @@ func newSigner(privKeyFile string) (*signer, error) {

return signer, nil
}

//checkArg Evaluates if argname is in args
func checkArg(argname string, args []string) bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

I like this helper function. Nice job!

@SwampDragons SwampDragons merged commit 9699af4 into hashicorp:master Jun 3, 2020
@SwampDragons SwampDragons added this to the 1.6.0 milestone Jun 4, 2020
@ghost
Copy link

ghost commented Jul 4, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators Jul 4, 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.

ansible-remote requiring private key even when ansible_password provided
2 participants