0

Does Ansible have a file or command like .bahs_history/history that can display the playbook execute history?

If there is no default setting that can do that, is that possible to record ansible-playbook execute history in Ubuntu?

I am very new to Ansible, any help is appreciated!

ITnewbie
  • 460
  • 6
  • 23
  • 2
    See the available callbacks `'ansible-doc -t callback -l'`, but IMO the best history is [Runner Artifacts](https://ansible-runner.readthedocs.io/en/stable/intro/#runner-artifacts-directory-hierarchy). – Vladimir Botka Mar 26 '22 at 06:59
  • @VladimirBotka Thanks for your solution, I took a look at the ansible runner/call back you mentioned. They are too advanced for me:) I will keep learning and hope one day I can deal with them. Anyway, thank you so much! – ITnewbie Apr 01 '22 at 03:43

1 Answers1

2

Since

By default Ansible sends output about plays, tasks, and module arguments to your screen (STDOUT) on the control node.

you can either configure Logging Ansible output as explained in the documentation or write results of certain tasks into a file.

Further Q&A

U880D
  • 8,601
  • 6
  • 24
  • 40