Skip to content

Instantly share code, notes, and snippets.

@adyrcz
Created June 14, 2018 09:27
Show Gist options
  • Save adyrcz/9e270c4073909f13b7296c8699746514 to your computer and use it in GitHub Desktop.
Save adyrcz/9e270c4073909f13b7296c8699746514 to your computer and use it in GitHub Desktop.
zero out logs ansible
- name: Zero out Log files
copy: dest=/var/log/{{ item }} content='' force=yes
with_items:
- audit/audit.log
- awslogs.log
- boot.log
- btmp
- cloud-init.log
- cloud-init-output.log
- cron
- dmesg
- dmesg.old
- grubby
- grubby_prune_debug
- lastlog
- maillog
- messages
- amazon/ssm/amazon-ssm-agent.log
- amazon/ssm/errors.log
- secure
- spooler
- tallylog
- wtmp
- yum.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment