To answer myself... I figured this simple solution :
in '__init__()'
....
self.realdisplay = self._display.display
self._display.display = self.display
then add a 'display()' method that intercept my message, and then calls
'self.realdisplay()'
Gonna run some tests now. Thanks for your time so far...
Pieter
Op dinsdag 7 juli 2020 om 12:19:18 UTC+2 schreef [email protected]:
> Hi all,
>
> please allow me to ask for any help here...
> I once wrote a custom callback plugin, where I
> subclassed ansible.utils.display.Display so I could overrule it's display()
> method to manipulate the message to be printed, and then call
> super(Display, self).display(.....
> Since Ansible 2.8 the Display object is now a singleton, instantiated
> right at 'ansible-playbook'. This means a cannot modify the
> Display.display() anymore right ?
>
> Any ideas on how to call a customized display() method ?
>
> Thanks in advance for any help.
>
> Pieter.
>
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/673cfc59-886f-4925-a8bc-64f142aad048n%40googlegroups.com.