Re: [ansible-project] Re: callback plugin log_plays double output in logs

2018-01-30 Thread Ansible Krazy
Is it also work if I use custom ansible.cfg file ... how to call callback
plugins in custom ansible.cfg

On Fri, Jan 12, 2018 at 2:27 PM, Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:

> On 09.01.2018 22:00, ansiblekr...@gmail.com wrote:
>
>> So I defined it under /usr/share/ansible/plugins/callback ansible one.
>>
>
> What do you mean with defined?
>
> log_plays is bundled with Ansible 2.4 so you only need to set
> "stdout_callback = log_plays" in ansible.cfg or set the environment
> variable ANSIBLE_STDOUT_CALLBACK=log_plays
>
>
> --
> Kai Stian Olstad
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/ansible-project/f6de30bb598b696c28fb45b0c120810d%40olstad.com.
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPWPJXZt67NJQJJWqyebmwQ-E_sLv6DVMOAVUzZ%3DXf1z9e88iQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: callback plugin log_plays double output in logs

2018-01-12 Thread Kai Stian Olstad

On 09.01.2018 22:00, ansiblekr...@gmail.com wrote:

So I defined it under /usr/share/ansible/plugins/callback ansible one.


What do you mean with defined?

log_plays is bundled with Ansible 2.4 so you only need to set 
"stdout_callback = log_plays" in ansible.cfg or set the environment 
variable ANSIBLE_STDOUT_CALLBACK=log_plays



--
Kai Stian Olstad

--
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f6de30bb598b696c28fb45b0c120810d%40olstad.com.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: callback plugin log_plays double output in logs

2018-01-09 Thread ansiblekrazy
So I defined it under /usr/share/ansible/plugins/callback ansible one. 
Tested on ansible 2.4.2.0, same result:

Jan 10 2018 02:25:17 - OK - omitted

Jan 10 2018 02:25:17 - OK - omitted

Jan 10 2018 02:25:17 - OK - {"msg": "hello", "changed": false, 
"_ansible_verbose_always": true, "_ansible_no_log": false}

Jan 10 2018 02:25:17 - OK - {"msg": "hello", "changed": false, 
"_ansible_verbose_always": true, "_ansible_no_log": false}

ansible 2.4.2.0


On Sunday, January 7, 2018 at 10:02:49 AM UTC+5:30, ansibl...@gmail.com 
wrote:
>
> Ansible log_plays plugin is logging double output in logs
>
>
> Jan 06 2018 10:20:29 - OK - omitted
>
>   Jan 06 2018 10:20:29 - OK - omitted
>
>   Jan 06 2018 10:20:29 - OK - {"msg": "hello", "changed": false, 
> "_ansible_verbose_always": true, "_ansible_no_log": false}
>
>   Jan 06 2018 10:20:29 - OK - {"msg": "hello", "changed": false, 
> "_ansible_verbose
>
> Playbook I'm running 
>  
>   - hosts: localhost
> connection: local
>
> tasks:
>   - debug:
>   msg: hello
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/f45dc601-829c-4e53-810f-153569a7ed53%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: callback plugin log_plays double output in logs

2018-01-08 Thread Matt Martz
If you copied that callback plugin into your own callback_plugins
directory, it is likely that you are affected by
https://github.com/ansible/ansible/issues/33484 which was recently resolved
in the devel branch for the 2.5 release.

On Sun, Jan 7, 2018 at 12:10 PM, Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:

> On Sunday, 7 January 2018 18.08.45 CET ansiblekr...@gmail.com wrote:
> > I'm using ansible verison
> >
> > ansible --version
> > ansible 2.5.0
> >
> > log_plays :
> > https://github.com/ansible/ansible/blob/devel/lib/
> ansible/plugins/callback/log_plays.py
>
> Tried latest, but I don't get double logging
>
> $ ansible --version
> ansible 2.5.0 (devel 2db9878c76) last updated 2018/01/07 18:17:41 (GMT
> +200)
>
>
> $ cat /var/log/ansible/hosts/localhost
> Jan 07 2018 19:02:53 - OK - omitted
>
> Jan 07 2018 19:02:53 - OK - {"msg": "hello", "attempts": 1, "changed":
> false, "_ansible_no_log": false, "_ansible_verbose_always": true}
>
>
> --
> Kai Stian Olstad
>
> --
> 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 ansible-project+unsubscr...@googlegroups.com.
> To post to this group, send email to ansible-project@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/ansible-project/3872742.gaNLhiK5Uv%40x1.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v9%2BBVwLOcKuJR3SDsr8cmWOz8OJ6N9%3DAxf1k2GZcHRgGg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-project] Re: callback plugin log_plays double output in logs

2018-01-07 Thread Kai Stian Olstad
On Sunday, 7 January 2018 18.08.45 CET ansiblekr...@gmail.com wrote:
> I'm using ansible verison
> 
> ansible --version
> ansible 2.5.0
> 
> log_plays : 
> https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/log_plays.py

Tried latest, but I don't get double logging

$ ansible --version
ansible 2.5.0 (devel 2db9878c76) last updated 2018/01/07 18:17:41 (GMT +200)


$ cat /var/log/ansible/hosts/localhost 
Jan 07 2018 19:02:53 - OK - omitted

Jan 07 2018 19:02:53 - OK - {"msg": "hello", "attempts": 1, "changed": false, 
"_ansible_no_log": false, "_ansible_verbose_always": true}


-- 
Kai Stian Olstad

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/3872742.gaNLhiK5Uv%40x1.
For more options, visit https://groups.google.com/d/optout.


[ansible-project] Re: callback plugin log_plays double output in logs

2018-01-07 Thread ansiblekrazy
I'm using ansible verison

ansible --version
ansible 2.5.0

log_plays : 
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/callback/log_plays.py

On Sunday, January 7, 2018 at 10:02:49 AM UTC+5:30, ansibl...@gmail.com 
wrote:
>
> Ansible log_plays plugin is logging double output in logs
>
>
> Jan 06 2018 10:20:29 - OK - omitted
>
>   Jan 06 2018 10:20:29 - OK - omitted
>
>   Jan 06 2018 10:20:29 - OK - {"msg": "hello", "changed": false, 
> "_ansible_verbose_always": true, "_ansible_no_log": false}
>
>   Jan 06 2018 10:20:29 - OK - {"msg": "hello", "changed": false, 
> "_ansible_verbose
>
> Playbook I'm running 
>  
>   - hosts: localhost
> connection: local
>
> tasks:
>   - debug:
>   msg: hello
>
>

-- 
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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/a28038d0-8d48-408e-8556-7608d4ab78d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.