ansible / molecule

Molecule aids in the development and testing of Ansible content: collections, playbooks and roles
https://ansible.readthedocs.io/projects/molecule/
MIT License
3.88k stars 662 forks source link

Goss support #324

Closed freeseacher closed 8 years ago

freeseacher commented 8 years ago

https://github.com/aelsabbahy/goss looks very interesting Can you please add support for running goss for tests ?

aelsabbahy commented 8 years ago

That would be neat. I'm going on vacation, so I can't put in code anytime soon. But feel free to ping me with any questions/concerns on how to integrate Goss.

One notable difference is that Goss is required on the target machine, it doesn't run over ssh like serverspec and testinfra.. not sure if that'll be challenging for your integration or not, but it's very simple to install/run.

retr0h commented 8 years ago

I have no plans to implement this support any time soon. Will likely need to happen from someone in the community.

kireledan commented 8 years ago

I kinda wanna take a try at this to learn about Goss so I might tinker with this over the weekend.

freeseacher commented 8 years ago

@kireledan any news ?

kireledan commented 8 years ago

I have not had much of a chance to look at this since school started back up again. But if anyone else wants to tackle it before I can get the chance, feel free to.

retr0h commented 8 years ago

This could actually be implemented today in playbook.yml. However, this wouldn't be implemented in a way where verify would work like the other verifiers.

If we were to implement this at some point in the future, we would probably want to invoke our Ansible Playbook class to execute "goss" playbooks. These playbooks can then target various host or groups to test (much like serverspec/testinfra can). These playbooks could live under tests/, as long as they don't end in .py, they would not be picked up by testinfra.

We would just leverage the goss-ansible library, much like we do with the idempotence callback.

retr0h commented 8 years ago

I'll prob take a look at this later in the week.

freeseacher commented 8 years ago

tnx

retr0h commented 8 years ago

@freeseacher @aelsabbahy added very rudimentary goss support in #430.

freeseacher commented 8 years ago

tnx. i will try to use it later.