indusbox / goss-ansible

Ansible module for Goss
MIT License
131 stars 15 forks source link

Support new goss validate options #13

Closed TomaszUrugOlszewski closed 5 years ago

TomaszUrugOlszewski commented 5 years ago

Support goss validate parameters:

Example from documentation:

keep running it until the system enters a valid state or we timeout

goss validate --retry-timeout 30s --sleep 1s
ggrossetie commented 5 years ago

Hello @TomaszUrugOlszewski and thanks for your contribution.

The code looks good and since it's supported on the goss command line we should probably add it but Ansible also supports this feature so it may create confusion: https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#retrying-a-task-until-a-condition-is-met

Could you please explain why you prefer to use the retry mechanism in Goss ?

TomaszUrugOlszewski commented 5 years ago

Hello @TomaszUrugOlszewski and thanks for your contribution.

The code looks good and since it's supported on the goss command line we should probably add it but Ansible also supports this feature so it may create confusion: https://docs.ansible.com/ansible/latest/user_guide/playbooks_loops.html#retrying-a-task-until-a-condition-is-met

Could you please explain why you prefer to use the retry mechanism in Goss ?

Oh I forget about this function in ansible, and because I focused on goss, I implemented it in goss. I think we can close this PR.