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

Example for winrm connection configuration #136

Closed pyriand3r closed 9 months ago

pyriand3r commented 10 months ago

Is there any possibility to configure a winrm connection with the current feature set?

There are no options in the configuration so i was wondering if there is another possibility. Or would the support of winrm connections need to be implemented?

apenella commented 9 months ago

Hi @pyriand3r! Thank you for opening that issue. Regarding what you are asking for, it's important to note that the library is not an implementation of Ansible in Go. Instead, it is a wrapper over the Ansible installation on your system, allowing you to execute any ansible or ansible-playbook command on your host through go-ansible.

Does it solve your doubts?

Thanks!

pyriand3r commented 9 months ago

Hi @apenella, thanks for the response.

I know that it is a wrapper, so i think a found a solution for my problem: env vars. Haven't tried it yet but it should be possible to configure ansible to connect via winrm through the env vars which i can set in go-ansible.

Closing this as it seems to be the answer.

Regards