ansible_stdout_compact_logger icon indicating copy to clipboard operation
ansible_stdout_compact_logger copied to clipboard

Incomplete output to log file

Open cf-sewe opened this issue 1 year ago • 0 comments

When I enable Ansible logging with log_path = ./ansible.log, the log output is incomplete and is missing the tasks being executed. Could this be improved please, because we need the logs for auditing purposes?

STDOUT:

[08:45:47] Gathering Facts
↳  jump | SUCCESS | 991ms
[08:45:48]     ↳ common/packages: Install epel repository
↳  jump | SUCCESS | 1.26s
[08:45:49]     ↳ common/packages: Ensure common packages are installed
↳  jump | SUCCESS | 1.06s
[08:45:50]     ↳ common/packages: Ensure forbidden packages are not installed
↳  jump | SUCCESS | 1.09s

ansible.log:

2023-11-03 08:45:48,440 p=1285948 u=ansible n=ansible | ↳  jump | SUCCESS | 991ms
2023-11-03 08:45:49,720 p=1285948 u=ansible n=ansible | ↳  jump | SUCCESS | 1.26s
2023-11-03 08:45:50,781 p=1285948 u=ansible n=ansible | ↳  jump | SUCCESS | 1.06s
2023-11-03 08:45:51,877 p=1285948 u=ansible n=ansible | ↳  jump | SUCCESS | 1.09s
2023-11-03 08:45:52,176 p=1285948 u=ansible n=ansible |  [ERROR]: User interrupted execution

ansible.cfg:

[defaults]
ansible_managed = Ansible managed: {file}
force_color = True
force_valid_group_names = ignore
host_key_checking = False
inject_facts_as_vars = True
log_path = ./ansible.log
nocows = 1
remote_user = ansible
retry_files_enabled = False
roles_path = ./roles
callback_plugins = ./.config/plugins/callback
stdout_callback = anstomlog

[connection]
pipelining = True

[ssh_connection]
pipelining = True

cf-sewe avatar Nov 03 '23 07:11 cf-sewe