Instead of a single log file defined in log_path, I want to have separate log files for each piece running in Ansible.
As far as I know, there is no built-in way to do this. Therefore, I am looking for smart hacks.
In particular, I want the log file to be generated in the [playlist name] format after the playbook has been launched. [date] .log
I found this thread in SO, but it does not meet my needs. An alias would be a solution if I could somehow rewrite the name of the play, and not just the date. The search solution would be fine if I could only copy the corresponding part from the main log file without any history up to the time of copying. Also, if you have many concurrent games, I don’t know how well this method will work.
Any hints / ideas? I thought I was creating a shell script that would be called inside the tutorial to somehow “extract” the relevant entries from the main journal and create a separate one. But I find that I am making it too complicated.
source
share