tool like pytest infra
I was wondering if its possible to have a tool similar to https://testinfra.readthedocs.io/en/latest/ with this library? At the moment I am using it with python but would love to rewrite with golang.
hi @keith6014! It sounds like a great initiative!
You can execute Ansible commands using the go-ansible library. Here are a couple of examples where I used the library to run Ansible commands from a Go application:
- This example uses version v1.2 of the library: https://github.com/gostevedore/stevedore/tree/main/internal/infrastructure/driver/ansible
- This second example uses version v2.0, and I encourage you to use this version rather than v1: https://github.com/apenella/ransidble/blob/main/internal/infrastructure/executor/ansible-playbook
I hope these examples inspire you and help you understand how to use the library.
Hi @keith6014! Did these examples inspire you on how to implement the testing tool?
@keith6014 I close this issue. If you need further help, please open a new issue or reopen this one.