4

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?

Note: 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".

Pierre.Vriens
  • 7,205
  • 14
  • 37
  • 84
Tran Triet
  • 819
  • 3
  • 10
  • 19

1 Answers1

2

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
Aykut Açikel
  • 176
  • 1
  • 3