2

In Ansible, I want to use a plugin parameter. For example, the profile_tasks plugin supports a parameter to "Adjust the sorting output of summary tasks".

I enable this plugin by whitelisting it in the ansible.cfg file by:

[defaults]
callback_whitelist = profile_tasks

But how do I use the parameter supported by the plugin?

  • 1
    What parameter would you like to pass instead of defining it? – 030 Jan 12 at 15:42
  • Sorry for the confusion. I just want to use it but I don't know how to. The document says "parameter" and normally I think the way to use a parameter is to "pass a parameter to a function/command line" so that's why I asked "how to pass a parameter". What I want to know is "How to use a plugin parameter". I modified the question. – Tran Triet Jan 13 at 12:18
0

I've not tested it, but as the doc says, you can configure the plugin via two ways : ini entries or env.

Add below your snippet the following and it should work :

[defaults]
callback_whitelist = profile_tasks

[callback_profile_tasks]
sort_order = descending

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.