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

generate ansible playbook by go template #125

Closed wahello closed 1 year ago

wahello commented 1 year ago

Generate playbooks by go template.

apenella commented 1 year ago

Hi @wahello I appreciate your contribution!

I don't understand what this feature pretends to solve or what is the use case, other than to provide an alternative to write playbook files.

What I see is that each Ansible module requires an analogue package in the library. It would increase the effort of maintainability and would couple the library to the Ansible modules. I want to keep the library focused on the execution of Ansible rather than being a mechanism to write Ansible playbooks.

If you are interested in that feature, another approach to solve your problem would be to create a new library over go-ansible, instead of adding it to the core of the library.

However, could you elaborate on a description of this feature and what it solves? Your point of view would help me to open my mind.

Thanks!!

wahello commented 1 year ago

@apenella Good propose.