yaml - Saving/updating ansible.log in SVN after every execution -
i have find solution, save/update ansible log file in svn after completion of script execution.
it should like, yml script completes execution, whether fails or passes, file ansible.log (which saves log locally) should saved svn automatically.
it should saved if on defined svn path no log file present, if log file present, should delete old log , replace new log file.
i tried googling it, couldn't find solution. links/pointer/way solve problem, in direction appreciated.
thank you
i use delegation run svn commands locally:
- name: commit logs command: /usr/local/bin/commit_ansible_logs.sh delegate_to: 127.0.0.1
this trigger commit_ansible_logs.sh bash script need write commit log.
see delegation in manual.
you can "detatch" command ansible if want put delay or loop watches ansible run finish.
the second half of article explains how "fire , and forget" task in ansible play.
Comments
Post a Comment