We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm hitting an issue where I'm getting an error trying to use more than one ssh extra arg:
This is the command that the library ends up running. This works when I run it manually.
/opt/homebrew/bin/ansible-playbook --extra-vars {"ansible_sudo_pass":"REDACTED"} --forks 5 --inventory 192.168.1.2, --ssh-extra-args ' -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null' --timeout 300 --user myuser --become-method sudo --become-user root /var/folders/3z/4hf8d_g93h77jtsj82y3ysb80000gn/T/.ansible-3124354280
When I run this via my go code and this library:
"tasks": [ { "hosts": { "192.168.1.2": { "action": "gather_facts", "changed": false, "msg": "Failed to connect to the host via ssh: command-line line 0: keyword stricthostkeychecking extra arguments at end of line", "unreachable": true } }, "task": { "duration": { "end": "2024-02-29T16:37:06.509821Z", "start": "2024-02-29T16:37:06.492520Z" }, "id": "66d3b971-6cc6-a701-202c-000000000009", "name": "Gathering Facts", "path": "/var/folders/3z/4hf8d_g93h77jtsj82y3ysb80000gn/T/.ansible-3124354280:1" } } ]
options.AnsibleConnectionOptions.SSHExtraArgs is just a string so how should multiple arguments be specified?
My connection options is being constructed like so:
"Connection": { "AskPass": false, "Connection": "", "PrivateKey": "", "SCPExtraArgs": "", "SFTPExtraArgs": "", "SSHCommonArgs": "", "SSHExtraArgs": " -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/dev/null", "Timeout": 300, "User": "myuser" },
The text was updated successfully, but these errors were encountered:
Hi @rhugga! Thank you very much for raising that issue. Let me take a look at this. Just letting you know, I will work on fixing that over the v2.0.0.
I keep you updated!
Sorry, something went wrong.
Hi @rhugga I have been working on that issue and I found the solution: eba64fd
I also prepared an example with a simple environment to validate it. Here you have a link to the example: https://github.com/apenella/go-ansible/tree/version-2.0.0-prerelease-2/examples/ansibleplaybook-ssh
The fix is not yet released.
I keep you updated.
Available in v2.0.0-rc-3
No branches or pull requests
I'm hitting an issue where I'm getting an error trying to use more than one ssh extra arg:
This is the command that the library ends up running. This works when I run it manually.
When I run this via my go code and this library:
options.AnsibleConnectionOptions.SSHExtraArgs is just a string so how should multiple arguments be specified?
My connection options is being constructed like so:
The text was updated successfully, but these errors were encountered: