apenella / go-ansible

Go-ansible is a Go package that enables the execution of ansible-playbook or ansible commands directly from Golang applications. It supports a wide range of options for each command, enabling smooth integration of Ansible functionality into your projects.
MIT License
905 stars 143 forks source link

SSH StrictHostKeyChecking #127

Closed PaPerM7 closed 1 year ago

PaPerM7 commented 1 year ago

Hi I wanted to know if there is a way to set StrictHostKeyChecking=no when im running my ansible playbook. I tried to add SSHCommonArgs: "-o StrictHostKeyChecking=no" to ansiblePlaybookConnectionOptions but it seems that its not working. i wanted to make sure if im doing it the right way or my attempts are just hopeless. Thank you for responding <3

apenella commented 1 year ago

Hi! @PaPerM7 Thanks for spotting that! I have seen that those arguments were not quoted and it could be the cause of your issue.

I created the pull request #128 which should solve it. Would you mind checking it before preparing a new release including the fix?

Thanks!

apenella commented 1 year ago

@PaPerM7 Did you have the chance to validate the PR https://github.com/apenella/go-ansible/pull/128?

Thanks!

apenella commented 1 year ago

@PaPerM7 I added the fix on the release v1.2.1