2021年1月26日星期二

How to suppress "Unsupported parameters" error in Ansible?

I am using a the quiet parameter in the assert module for tasks where the output is too verbose. The quiet parameter was introduced in Ansible 2.8, but unfortunately, my code sometimes needs to run on Debian Buster, which still comes with Ansible 2.7.

In that case, Ansible fails with the fatal error "Unsupported parameters for (assert) module: quiet". Since this is only a cosmetic parameter, I want Ansible 2.7 to ignore this parameter and continue.

Is there a way to add this parameter in my task so that Ansible 2.8 is nice and quiet, but the task still runs in Ansible 2.7?

- name: Silent assert    assert:      that:        - true      quiet: yes  
https://stackoverflow.com/questions/65910893/how-to-suppress-unsupported-parameters-error-in-ansible January 27, 2021 at 07:41AM

没有评论:

发表评论