Try creating an alias.

alias ansible-playbook='ANSIBLE_LOG_PATH="${HOME}/logs/ansible-$(date 
+%H%M%S).log" ansible-playbook'




On Wednesday, February 27, 2019 at 1:23:22 AM UTC-6, Qin Peter wrote:
>
> Hi All,
> This is Peter and I am newer to Ansible.
>
> I am trying to store the ansible running log to a file. And every playbook 
> will have separate ansible running log file.
> I know I can use   'export  ANSIBLE_LOG_PATH=~/share/logging/peter.log' 
> this variable to do this. But is there any other way?
>
> I prefer a command line parameter or a module. I would like to do some 
> development work but I need some directive guidance.
>
> I cannot use plugin because I cannot affect other ansible users, also I 
> have no right to change the ansible.cfg file. Too much limitataion from the 
> boss, right?
>
> Thanks for any help.
>
> Best Regards,
> Peter Qin
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to