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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

feature: Cmd run Dir

zhangguanzhang opened this issue · comments

need ansible-plabook run Dir set
https://pkg.go.dev/os/exec#Cmd Cmd.Dir

hi @zhangguanzhang
would you describe a little bit more which is your proposal? Is that a missing ansible-playbook option... what do you expect about this feature? Could you give me some example?
Is not enough to define the playbook location on AnsiblePlaybookCmd?

Thank you very much!

Cmd.Dir should could be set by user, user will use go-ansible to write a cli tool, and the playbook will be other place

I really need this feature, can you complete it in a short time?Thanks 😘

Looking forward to the release of the next tag version

@zhangguanzhang I merged #31 so quick that I was not realized about your update on Executor interface, which includes the method SetCmdRunDir. That is a breaking change and to avoid you to wait till v1.0.0, I would like to rethink it in some way to keep the original interface definition. Keeping the original interface will let me to release ' v0.8.0' earlier, may be on the next couple of days.
Do you need the method SetCmdRunDir on the interface for some reason?
Thanks!

Hi @zhangguanzhang
v0.8.0 with CmdRunDir has been released with no breaking changes.

I am refining the last ideas for v1.0.0, which will come with a few breaking changes. One of these breaking changes is a way to define options for Executor.