Skip to content

Add logging to Ansible Playbooks #2745

Closed
@Haroon-Khel

Description

A solution inspired by @gdams. Add a role to the playbooks which updates a file on the remote machine indicating that the playbook has run on the remote machine, including a timestamp.

This file should be able to be queried by test tools to determine when the last playbook run happened on the remote machine

Features:

  • Basic log (date and time)
  • Runs even when certain roles are specified with -t
  • Logs which roles were executed
  • Runs log even when playbook fails (might require handlers)
  • Logs git hash (or equivalent) of playbook

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions