Yes the internal ansible APIs have changed in v2

Have a look at the other plugins in your ansible installation.

For example

site-packages/ansible/plugins/callback/timer.py

You will notice that the plugins now subclass CallbackModule.

Another change in Ansible 2.0 is that you can just whitelist the plugins 
that you want to use in your ansible.cfg, rather than having to copy them 
to somewhere on your plugin path.

Hope this helps,

Jon

On Wednesday, 3 February 2016 13:48:38 UTC, [email protected] wrote:
>
> I believe you should use 'v2_' versions of functions in 2.0
>
> On Wednesday, February 3, 2016 at 4:23:05 PM UTC+3, Ankit Kulkarni wrote:
>>
>> We are using ansible in our production and our log_plays callback plugin 
>> just broke after upgrading from 1.9.4 to 2.0.0.1 .
>>   
>> I need to put my custom logging using log_plays.py ( say store the 
>> results in a sqllitedb for later analysis ) . The same was working fine 
>> till ansible 1.9.4 . I am using *ansible 2.0.0 on ubuntu 14.04 64 bit . *
>>
>> I used this log file 
>> https://github.com/ansible/ansible/blob/stable-2.0.0.1/lib/ansibale/plugins/callback/log_plays.py
>>  
>> . Any function overrided under the `class CallbackModule(CallbackBase):` are 
>> not reflecting while the code outside class is working .  
>>
>> Example - 
>>
>> def runner_on_ok(self, host, res):
>>         self.log(host, 'ok-it-worked', res)
>>
>>
>> I wanted to use the *playbook_on_stats(self, stats) *function . How can 
>>> I use it  ? I can see the changes from the 1.9.4 log_plays.py file 
>>> https://github.com/ansible/ansible/blob/stable-1.9/plugins/callbacks/log_plays.py
>>>  
>>>  like now  not all functions are included but not getting why the functions 
>>> are not overriding . 
>>
>>
>>
>>

-- 
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7303972f-303d-4984-a294-7be8953f0e09%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to